From c984dd73c6f96d16e11813ae433ef70f7648ae77 Mon Sep 17 00:00:00 2001 From: Alex Sakhartchouk Date: Tue, 14 Sep 2010 09:50:43 -0700 Subject: Shader changes to allow for more flexible constant binding. Change-Id: Ic66e6e2a371c6e3d5dce1b00f63acab8c09bd110 --- libs/rs/rsProgram.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libs/rs/rsProgram.h') 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(); -- cgit v1.1