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.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/graphics/java/android/renderscript/Program.java b/graphics/java/android/renderscript/Program.java
index a1b1ba3..3f769ee 100644
--- a/graphics/java/android/renderscript/Program.java
+++ b/graphics/java/android/renderscript/Program.java
@@ -77,6 +77,40 @@ public class Program extends BaseObj {
}
/**
+ * @hide
+ */
+ public int getConstantCount() {
+ return mConstants != null ? mConstants.length : 0;
+ }
+
+ /**
+ * @hide
+ */
+ public Type getConstant(int slot) {
+ if (slot < 0 || slot >= mConstants.length) {
+ throw new IllegalArgumentException("Slot ID out of range.");
+ }
+ return mConstants[slot];
+ }
+
+ /**
+ * @hide
+ */
+ public int getTextureCount() {
+ return mTextureCount;
+ }
+
+ /**
+ * @hide
+ */
+ public TextureType getTextureType(int slot) {
+ if ((slot < 0) || (slot >= mTextureCount)) {
+ throw new IllegalArgumentException("Slot ID out of range.");
+ }
+ return mTextures[slot];
+ }
+
+ /**
* Binds a constant buffer to be used as uniform inputs to the
* program
*