Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3489aa9a authored by Narayan Kamath's avatar Narayan Kamath Committed by Android Git Automerger
Browse files

am d138029d: am 14420e29: Merge "AArch64: Use long[] for RS id array"

* commit 'd138029d':
  AArch64: Use long[] for RS id array
parents 1767ea64 d138029d
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -803,8 +803,6 @@ public class Element extends BaseObj {
    void updateFromNative() {
        super.updateFromNative();

        // FIXME: updateFromNative is broken in JNI for 64-bit

        // we will pack mType; mKind; mNormalized; mVectorSize; NumSubElements
        int[] dataBuffer = new int[5];
        mRS.nElementGetNativeData(getID(mRS), dataBuffer);
@@ -831,7 +829,7 @@ public class Element extends BaseObj {
            mArraySizes = new int[numSubElements];
            mOffsetInBytes = new int[numSubElements];

            int[] subElementIds = new int[numSubElements];
            long[] subElementIds = new long[numSubElements];
            mRS.nElementGetSubElements(getID(mRS), subElementIds, mElementNames, mArraySizes);
            for(int i = 0; i < numSubElements; i ++) {
                mElements[i] = new Element(subElementIds[i], mRS);
@@ -1090,10 +1088,9 @@ public class Element extends BaseObj {
            java.lang.System.arraycopy(mElementNames, 0, sin, 0, mCount);
            java.lang.System.arraycopy(mArraySizes, 0, asin, 0, mCount);

            // FIXME: broken for 64-bit
            int[] ids = new int[ein.length];
            long[] ids = new long[ein.length];
            for (int ct = 0; ct < ein.length; ct++ ) {
                ids[ct] = (int)ein[ct].getID(mRS);
                ids[ct] = ein[ct].getID(mRS);
            }
            long id = mRS.nElementCreate2(ids, sin, asin);
            return new Element(id, mRS, ein, sin, asin);
+10 −10
Original line number Diff line number Diff line
@@ -154,8 +154,8 @@ public class Mesh extends BaseObj {
        int vtxCount = mRS.nMeshGetVertexBufferCount(getID(mRS));
        int idxCount = mRS.nMeshGetIndexCount(getID(mRS));

        int[] vtxIDs = new int[vtxCount];
        int[] idxIDs = new int[idxCount];
        long[] vtxIDs = new long[vtxCount];
        long[] idxIDs = new long[idxCount];
        int[] primitives = new int[idxCount];

        mRS.nMeshGetVertices(getID(mRS), vtxIDs, vtxCount);
@@ -350,8 +350,8 @@ public class Mesh extends BaseObj {
        **/
        public Mesh create() {
            mRS.validate();
            int[] vtx = new int[mVertexTypeCount];
            int[] idx = new int[mIndexTypes.size()];
            long[] vtx = new long[mVertexTypeCount];
            long[] idx = new long[mIndexTypes.size()];
            int[] prim = new int[mIndexTypes.size()];

            Allocation[] vertexBuffers = new Allocation[mVertexTypeCount];
@@ -367,7 +367,7 @@ public class Mesh extends BaseObj {
                    alloc = Allocation.createSized(mRS, entry.e, entry.size, mUsage);
                }
                vertexBuffers[ct] = alloc;
                vtx[ct] = (int)alloc.getID(mRS);
                vtx[ct] = alloc.getID(mRS);
            }

            for(int ct = 0; ct < mIndexTypes.size(); ct ++) {
@@ -382,7 +382,7 @@ public class Mesh extends BaseObj {
                indexBuffers[ct] = alloc;
                primitives[ct] = entry.prim;

                idx[ct] = (int)allocID;
                idx[ct] = allocID;
                prim[ct] = entry.prim.mID;
            }

@@ -506,8 +506,8 @@ public class Mesh extends BaseObj {
        public Mesh create() {
            mRS.validate();

            int[] vtx = new int[mVertexTypeCount];
            int[] idx = new int[mIndexTypes.size()];
            long[] vtx = new long[mVertexTypeCount];
            long[] idx = new long[mIndexTypes.size()];
            int[] prim = new int[mIndexTypes.size()];

            Allocation[] indexBuffers = new Allocation[mIndexTypes.size()];
@@ -517,7 +517,7 @@ public class Mesh extends BaseObj {
            for(int ct = 0; ct < mVertexTypeCount; ct ++) {
                Entry entry = mVertexTypes[ct];
                vertexBuffers[ct] = entry.a;
                vtx[ct] = (int)entry.a.getID(mRS);
                vtx[ct] = entry.a.getID(mRS);
            }

            for(int ct = 0; ct < mIndexTypes.size(); ct ++) {
@@ -526,7 +526,7 @@ public class Mesh extends BaseObj {
                indexBuffers[ct] = entry.a;
                primitives[ct] = entry.prim;

                idx[ct] = (int)allocID;
                idx[ct] = allocID;
                prim[ct] = entry.prim.mID;
            }

+5 −5
Original line number Diff line number Diff line
@@ -65,25 +65,25 @@ public class ProgramFragment extends Program {
         */
        public ProgramFragment create() {
            mRS.validate();
            int[] tmp = new int[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
            long[] tmp = new long[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
            String[] texNames = new String[mTextureCount];
            int idx = 0;

            for (int i=0; i < mInputCount; i++) {
                tmp[idx++] = ProgramParam.INPUT.mID;
                tmp[idx++] = (int)mInputs[i].getID(mRS);
                tmp[idx++] = mInputs[i].getID(mRS);
            }
            for (int i=0; i < mOutputCount; i++) {
                tmp[idx++] = ProgramParam.OUTPUT.mID;
                tmp[idx++] = (int)mOutputs[i].getID(mRS);
                tmp[idx++] = mOutputs[i].getID(mRS);
            }
            for (int i=0; i < mConstantCount; i++) {
                tmp[idx++] = ProgramParam.CONSTANT.mID;
                tmp[idx++] = (int)mConstants[i].getID(mRS);
                tmp[idx++] = mConstants[i].getID(mRS);
            }
            for (int i=0; i < mTextureCount; i++) {
                tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
                tmp[idx++] = (int)mTextureTypes[i].mID;
                tmp[idx++] = mTextureTypes[i].mID;
                texNames[i] = mTextureNames[i];
            }

+5 −5
Original line number Diff line number Diff line
@@ -52,25 +52,25 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
         */
        public ProgramFragmentFixedFunction create() {
            mRS.validate();
            int[] tmp = new int[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
            long[] tmp = new long[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
            String[] texNames = new String[mTextureCount];
            int idx = 0;

            for (int i=0; i < mInputCount; i++) {
                tmp[idx++] = ProgramParam.INPUT.mID;
                tmp[idx++] = (int)mInputs[i].getID(mRS);
                tmp[idx++] = mInputs[i].getID(mRS);
            }
            for (int i=0; i < mOutputCount; i++) {
                tmp[idx++] = ProgramParam.OUTPUT.mID;
                tmp[idx++] = (int)mOutputs[i].getID(mRS);
                tmp[idx++] = mOutputs[i].getID(mRS);
            }
            for (int i=0; i < mConstantCount; i++) {
                tmp[idx++] = ProgramParam.CONSTANT.mID;
                tmp[idx++] = (int)mConstants[i].getID(mRS);
                tmp[idx++] = mConstants[i].getID(mRS);
            }
            for (int i=0; i < mTextureCount; i++) {
                tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
                tmp[idx++] = (int)mTextureTypes[i].mID;
                tmp[idx++] = mTextureTypes[i].mID;
                texNames[i] = mTextureNames[i];
            }

+5 −5
Original line number Diff line number Diff line
@@ -126,25 +126,25 @@ public class ProgramVertex extends Program {
         */
        public ProgramVertex create() {
            mRS.validate();
            int[] tmp = new int[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
            long[] tmp = new long[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
            String[] texNames = new String[mTextureCount];
            int idx = 0;

            for (int i=0; i < mInputCount; i++) {
                tmp[idx++] = ProgramParam.INPUT.mID;
                tmp[idx++] = (int)mInputs[i].getID(mRS);
                tmp[idx++] = mInputs[i].getID(mRS);
            }
            for (int i=0; i < mOutputCount; i++) {
                tmp[idx++] = ProgramParam.OUTPUT.mID;
                tmp[idx++] = (int)mOutputs[i].getID(mRS);
                tmp[idx++] = mOutputs[i].getID(mRS);
            }
            for (int i=0; i < mConstantCount; i++) {
                tmp[idx++] = ProgramParam.CONSTANT.mID;
                tmp[idx++] = (int)mConstants[i].getID(mRS);
                tmp[idx++] = mConstants[i].getID(mRS);
            }
            for (int i=0; i < mTextureCount; i++) {
                tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
                tmp[idx++] = (int)mTextureTypes[i].mID;
                tmp[idx++] = mTextureTypes[i].mID;
                texNames[i] = mTextureNames[i];
            }

Loading