summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/java/android/renderscript/ProgramVertexFixedFunction.java')
-rw-r--r--graphics/java/android/renderscript/ProgramVertexFixedFunction.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
index 740d6a5a9566..54f21b834efc 100644
--- a/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
+++ b/graphics/java/android/renderscript/ProgramVertexFixedFunction.java
@@ -70,26 +70,28 @@ public class ProgramVertexFixedFunction extends ProgramVertex {
public ProgramVertexFixedFunction create() {
mRS.validate();
int[] tmp = new int[(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++] = mInputs[i].getID();
+ tmp[idx++] = mInputs[i].getID(mRS);
}
for (int i=0; i < mOutputCount; i++) {
tmp[idx++] = ProgramParam.OUTPUT.mID;
- tmp[idx++] = mOutputs[i].getID();
+ tmp[idx++] = mOutputs[i].getID(mRS);
}
for (int i=0; i < mConstantCount; i++) {
tmp[idx++] = ProgramParam.CONSTANT.mID;
- tmp[idx++] = mConstants[i].getID();
+ tmp[idx++] = mConstants[i].getID(mRS);
}
for (int i=0; i < mTextureCount; i++) {
tmp[idx++] = ProgramParam.TEXTURE_TYPE.mID;
tmp[idx++] = mTextureTypes[i].mID;
+ texNames[i] = mTextureNames[i];
}
- int id = mRS.nProgramVertexCreate(mShader, tmp);
+ int id = mRS.nProgramVertexCreate(mShader, texNames, tmp);
ProgramVertexFixedFunction pv = new ProgramVertexFixedFunction(id, mRS);
initProgram(pv);
return pv;
@@ -202,7 +204,7 @@ public class ProgramVertexFixedFunction extends ProgramVertex {
public Constants(RenderScript rs) {
Type constInputType = ProgramVertexFixedFunction.Builder.getConstantInputType(rs);
mAlloc = Allocation.createTyped(rs, constInputType);
- int bufferSize = constInputType.getElement().getSizeBytes()*
+ int bufferSize = constInputType.getElement().getBytesSize()*
constInputType.getCount();
mIOBuffer = new FieldPacker(bufferSize);
mModel = new Matrix4f();