Loading libs/rs/rsContext.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -239,7 +239,7 @@ void Context::timerPrint() void Context::setupCheck() { if (checkVersion2_0()) { mShaderCache.lookup(mVertex.get(), mFragment.get()); mShaderCache.lookup(this, mVertex.get(), mFragment.get()); mFragmentStore->setupGL2(this, &mStateFragmentStore); mFragment->setupGL2(this, &mStateFragment, &mShaderCache); Loading Loading @@ -272,6 +272,7 @@ void * Context::threadProc(void *vrsc) rsc->props.mLogTimes = getProp("debug.rs.profile"); rsc->props.mLogScripts = getProp("debug.rs.script"); rsc->props.mLogObjects = getProp("debug.rs.objects"); rsc->props.mLogShaders = getProp("debug.rs.shaders"); ScriptTLSStruct *tlsStruct = new ScriptTLSStruct; if (!tlsStruct) { Loading libs/rs/rsContext.h +1 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,7 @@ public: bool mLogTimes; bool mLogScripts; bool mLogObjects; bool mLogShaders; } props; void dumpDebug() const; Loading libs/rs/rsProgram.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -125,13 +125,15 @@ void Program::createShader() { } bool Program::loadShader(uint32_t type) bool Program::loadShader(Context *rsc, uint32_t type) { mShaderID = glCreateShader(type); rsAssert(mShaderID); if (rsc->props.mLogShaders) { LOGV("Loading shader type %x, ID %i", type, mShaderID); LOGE(mShader.string()); LOGV(mShader.string()); } if (mShaderID) { const char * ss = mShader.string(); Loading @@ -156,7 +158,10 @@ bool Program::loadShader(uint32_t type) } } } if (rsc->props.mLogShaders) { LOGV("--Shader load result %x ", glGetError()); } return true; } Loading libs/rs/rsProgram.h +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ protected: String8 mAttribNames[MAX_ATTRIBS]; String8 mUniformNames[MAX_UNIFORMS]; bool loadShader(uint32_t type); bool loadShader(Context *, uint32_t type); public: void forceDirty() const {mDirty = true;} Loading libs/rs/rsProgramFragment.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -161,8 +161,8 @@ void ProgramFragment::setupGL2(const Context *rsc, ProgramFragmentState *state, //LOGE("sgl2 frag2 %x", glGetError()); } void ProgramFragment::loadShader() { Program::loadShader(GL_FRAGMENT_SHADER); void ProgramFragment::loadShader(Context *rsc) { Program::loadShader(rsc, GL_FRAGMENT_SHADER); } void ProgramFragment::createShader() Loading Loading
libs/rs/rsContext.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -239,7 +239,7 @@ void Context::timerPrint() void Context::setupCheck() { if (checkVersion2_0()) { mShaderCache.lookup(mVertex.get(), mFragment.get()); mShaderCache.lookup(this, mVertex.get(), mFragment.get()); mFragmentStore->setupGL2(this, &mStateFragmentStore); mFragment->setupGL2(this, &mStateFragment, &mShaderCache); Loading Loading @@ -272,6 +272,7 @@ void * Context::threadProc(void *vrsc) rsc->props.mLogTimes = getProp("debug.rs.profile"); rsc->props.mLogScripts = getProp("debug.rs.script"); rsc->props.mLogObjects = getProp("debug.rs.objects"); rsc->props.mLogShaders = getProp("debug.rs.shaders"); ScriptTLSStruct *tlsStruct = new ScriptTLSStruct; if (!tlsStruct) { Loading
libs/rs/rsContext.h +1 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,7 @@ public: bool mLogTimes; bool mLogScripts; bool mLogObjects; bool mLogShaders; } props; void dumpDebug() const; Loading
libs/rs/rsProgram.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -125,13 +125,15 @@ void Program::createShader() { } bool Program::loadShader(uint32_t type) bool Program::loadShader(Context *rsc, uint32_t type) { mShaderID = glCreateShader(type); rsAssert(mShaderID); if (rsc->props.mLogShaders) { LOGV("Loading shader type %x, ID %i", type, mShaderID); LOGE(mShader.string()); LOGV(mShader.string()); } if (mShaderID) { const char * ss = mShader.string(); Loading @@ -156,7 +158,10 @@ bool Program::loadShader(uint32_t type) } } } if (rsc->props.mLogShaders) { LOGV("--Shader load result %x ", glGetError()); } return true; } Loading
libs/rs/rsProgram.h +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ protected: String8 mAttribNames[MAX_ATTRIBS]; String8 mUniformNames[MAX_UNIFORMS]; bool loadShader(uint32_t type); bool loadShader(Context *, uint32_t type); public: void forceDirty() const {mDirty = true;} Loading
libs/rs/rsProgramFragment.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -161,8 +161,8 @@ void ProgramFragment::setupGL2(const Context *rsc, ProgramFragmentState *state, //LOGE("sgl2 frag2 %x", glGetError()); } void ProgramFragment::loadShader() { Program::loadShader(GL_FRAGMENT_SHADER); void ProgramFragment::loadShader(Context *rsc) { Program::loadShader(rsc, GL_FRAGMENT_SHADER); } void ProgramFragment::createShader() Loading