diff options
| author | Alex Sakhartchouk <alexst@google.com> | 2010-09-14 09:50:43 -0700 |
|---|---|---|
| committer | Alex Sakhartchouk <alexst@google.com> | 2010-09-14 09:50:43 -0700 |
| commit | c984dd73c6f96d16e11813ae433ef70f7648ae77 (patch) | |
| tree | a40cb9dc5d1b3020e4cf33f575714e72ef3e805f /libs/rs/rsProgram.h | |
| parent | bcd3387eed8910c540d92f26fb6680e9e0ce0588 (diff) | |
| download | frameworks_base-c984dd73c6f96d16e11813ae433ef70f7648ae77.zip frameworks_base-c984dd73c6f96d16e11813ae433ef70f7648ae77.tar.gz frameworks_base-c984dd73c6f96d16e11813ae433ef70f7648ae77.tar.bz2 | |
Shader changes to allow for more flexible constant binding.
Change-Id: Ic66e6e2a371c6e3d5dce1b00f63acab8c09bd110
Diffstat (limited to 'libs/rs/rsProgram.h')
| -rw-r--r-- | libs/rs/rsProgram.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/rs/rsProgram.h b/libs/rs/rsProgram.h index ddc5e8a..e7329c2 100644 --- a/libs/rs/rsProgram.h +++ b/libs/rs/rsProgram.h @@ -23,10 +23,10 @@ // --------------------------------------------------------------------------- namespace android { namespace renderscript { - - class ShaderCache; +#define RS_SHADER_INTERNAL "//rs_shader_internal\n" + class Program : public ObjectBase { public: @@ -42,7 +42,7 @@ public: void bindAllocation(Allocation *, uint32_t slot); virtual void createShader(); - bool isUserProgram() const {return mUserShader.size() > 0;} + bool isUserProgram() const {return !mIsInternal;} void bindTexture(uint32_t slot, Allocation *); void bindSampler(uint32_t slot, Sampler *); @@ -71,6 +71,7 @@ protected: uint32_t mOutputCount; uint32_t mConstantCount; bool mIsValid; + bool mIsInternal; // Applies to vertex and fragment shaders only void appendUserConstants(); |
