summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsProgram.h
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2010-09-23 16:16:33 -0700
committerAlex Sakhartchouk <alexst@google.com>2010-09-23 16:16:33 -0700
commitb89aaacb2ca9d062e0a17a32e3d4dbf3f6948a17 (patch)
tree01a6a7c86f5b91018a81d74f16320ce1ed207445 /libs/rs/rsProgram.h
parent5eb22e2ce1cb46d18ce0c8e68e10a7f64bed01ea (diff)
downloadframeworks_base-b89aaacb2ca9d062e0a17a32e3d4dbf3f6948a17.zip
frameworks_base-b89aaacb2ca9d062e0a17a32e3d4dbf3f6948a17.tar.gz
frameworks_base-b89aaacb2ca9d062e0a17a32e3d4dbf3f6948a17.tar.bz2
Adding support for all allowed textures.
Cleaning up unused code Adding error messages Change-Id: I3a92476738ff7699d49feeafcd3eee6f70621acb
Diffstat (limited to 'libs/rs/rsProgram.h')
-rw-r--r--libs/rs/rsProgram.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/rs/rsProgram.h b/libs/rs/rsProgram.h
index e7329c2..a8f34c3 100644
--- a/libs/rs/rsProgram.h
+++ b/libs/rs/rsProgram.h
@@ -32,20 +32,19 @@ class Program : public ObjectBase
public:
const static uint32_t MAX_ATTRIBS = 8;
const static uint32_t MAX_UNIFORMS = 16;
- const static uint32_t MAX_TEXTURE = 2;
Program(Context *);
Program(Context *, const char * shaderText, uint32_t shaderLength,
const uint32_t * params, uint32_t paramLength);
virtual ~Program();
- void bindAllocation(Allocation *, uint32_t slot);
+ void bindAllocation(Context *, Allocation *, uint32_t slot);
virtual void createShader();
bool isUserProgram() const {return !mIsInternal;}
- void bindTexture(uint32_t slot, Allocation *);
- void bindSampler(uint32_t slot, Sampler *);
+ void bindTexture(Context *, uint32_t slot, Allocation *);
+ void bindSampler(Context *, uint32_t slot, Sampler *);
uint32_t getShaderID() const {return mShaderID;}
void setShader(const char *, uint32_t len);
@@ -75,7 +74,7 @@ protected:
// Applies to vertex and fragment shaders only
void appendUserConstants();
- void setupUserConstants(ShaderCache *sc, bool isFragment);
+ void setupUserConstants(Context *rsc, ShaderCache *sc, bool isFragment);
void initAddUserElement(const Element *e, String8 *names, uint32_t *count, const char *prefix);
ObjectBaseRef<Allocation> mConstants[MAX_UNIFORMS];
@@ -97,8 +96,8 @@ protected:
// and filtered.
//
// Constants are strictly accessed by programetic loads.
- ObjectBaseRef<Allocation> mTextures[MAX_TEXTURE];
- ObjectBaseRef<Sampler> mSamplers[MAX_TEXTURE];
+ ObjectBaseRef<Allocation> *mTextures;
+ ObjectBaseRef<Sampler> *mSamplers;
bool loadShader(Context *, uint32_t type);