summaryrefslogtreecommitdiffstats
path: root/graphics/java/android/renderscript/Program.java
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/java/android/renderscript/Program.java')
-rw-r--r--graphics/java/android/renderscript/Program.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/graphics/java/android/renderscript/Program.java b/graphics/java/android/renderscript/Program.java
index 9d70cb2..1614ec5 100644
--- a/graphics/java/android/renderscript/Program.java
+++ b/graphics/java/android/renderscript/Program.java
@@ -111,12 +111,13 @@ public class Program extends BaseObj {
mOutputs[mOutputCount++] = e;
}
- public void addConstant(Type t) throws IllegalStateException {
+ public int addConstant(Type t) throws IllegalStateException {
// Should check for consistant and non-conflicting names...
if(mConstantCount >= MAX_CONSTANT) {
throw new IllegalArgumentException("Max input count exceeded.");
}
- mConstants[mConstantCount++] = t;
+ mConstants[mConstantCount] = t;
+ return mConstantCount++;
}
public void setTextureCount(int count) throws IllegalArgumentException {