diff options
author | Alex Sakhartchouk <alexst@google.com> | 2011-10-18 10:54:29 -0700 |
---|---|---|
committer | Alex Sakhartchouk <alexst@google.com> | 2011-10-18 10:54:29 -0700 |
commit | 064aa7ed76db9564b041afcd4b75da5b3d12faba (patch) | |
tree | 1219cee07a9d9b1cf371198a52235bde78a9a022 /rsProgram.h | |
parent | 407f8ca5a1cd2269dba356f40ab32a5ff934a6a2 (diff) | |
download | rs-064aa7ed76db9564b041afcd4b75da5b3d12faba.tar.gz |
Remove ObjBaseRef from the hal struct
Change-Id: Idcac14ecfdd4d06a0f54bf50e3b9657be62e6638
Diffstat (limited to 'rsProgram.h')
-rw-r--r-- | rsProgram.h | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/rsProgram.h b/rsProgram.h index 3237a729..06fc3eca 100644 --- a/rsProgram.h +++ b/rsProgram.h @@ -30,19 +30,6 @@ namespace renderscript { class Program : public ProgramBase { public: - - Program(Context *, const char * shaderText, uint32_t shaderLength, - const uint32_t * params, uint32_t paramLength); - virtual ~Program(); - virtual bool freeChildren(); - - void bindAllocation(Context *, Allocation *, uint32_t slot); - - bool isUserProgram() const {return !mIsInternal;} - - void bindTexture(Context *, uint32_t slot, Allocation *); - void bindSampler(Context *, uint32_t slot, Sampler *); - struct Hal { mutable void *drv; @@ -53,25 +40,43 @@ public: // and filtered. // // Constants are strictly accessed by the shader code - ObjectBaseRef<Allocation> *textures; + Allocation **textures; RsTextureTarget *textureTargets; uint32_t texturesCount; - ObjectBaseRef<Sampler> *samplers; + Sampler **samplers; uint32_t samplersCount; - ObjectBaseRef<Allocation> *constants; - ObjectBaseRef<Type> *constantTypes; + Allocation **constants; + Type **constantTypes; uint32_t constantsCount; - ObjectBaseRef<Element> *inputElements; + Element **inputElements; uint32_t inputElementsCount; }; State state; }; Hal mHal; + Program(Context *, const char * shaderText, uint32_t shaderLength, + const uint32_t * params, uint32_t paramLength); + virtual ~Program(); + virtual bool freeChildren(); + + void bindAllocation(Context *, Allocation *, uint32_t slot); + + bool isUserProgram() const {return !mIsInternal;} + + void bindTexture(Context *, uint32_t slot, Allocation *); + void bindSampler(Context *, uint32_t slot, Sampler *); + protected: + ObjectBaseRef<Allocation> *mTextures; + ObjectBaseRef<Sampler> *mSamplers; + ObjectBaseRef<Allocation> *mConstants; + ObjectBaseRef<Type> *mConstantTypes; + ObjectBaseRef<Element> *mInputElements; + bool mIsInternal; String8 mUserShader; void initMemberVars(); |