diff options
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 55b6f5e2a6..d634945632 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -1171,7 +1171,8 @@ S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode, LLTe void LLGLSLShader::uniform1i(U32 index, GLint x) { - LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER + LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); if (mProgramObject) { if (mUniform.size() <= index) @@ -1194,7 +1195,9 @@ void LLGLSLShader::uniform1i(U32 index, GLint x) void LLGLSLShader::uniform1f(U32 index, GLfloat x) { - LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER + LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1218,6 +1221,7 @@ void LLGLSLShader::uniform1f(U32 index, GLfloat x) void LLGLSLShader::fastUniform1f(U32 index, GLfloat x) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); llassert(mProgramObject); llassert(mUniform.size() <= index); llassert(mUniform[index] >= 0); @@ -1227,6 +1231,8 @@ void LLGLSLShader::fastUniform1f(U32 index, GLfloat x) void LLGLSLShader::uniform2f(U32 index, GLfloat x, GLfloat y) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1251,6 +1257,8 @@ void LLGLSLShader::uniform2f(U32 index, GLfloat x, GLfloat y) void LLGLSLShader::uniform3f(U32 index, GLfloat x, GLfloat y, GLfloat z) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1275,6 +1283,8 @@ void LLGLSLShader::uniform3f(U32 index, GLfloat x, GLfloat y, GLfloat z) void LLGLSLShader::uniform4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1299,6 +1309,8 @@ void LLGLSLShader::uniform4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1323,6 +1335,8 @@ void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v) void LLGLSLShader::uniform4iv(U32 index, U32 count, const GLint* v) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1348,6 +1362,8 @@ void LLGLSLShader::uniform4iv(U32 index, U32 count, const GLint* v) void LLGLSLShader::uniform1fv(U32 index, U32 count, const GLfloat* v) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1372,6 +1388,8 @@ void LLGLSLShader::uniform1fv(U32 index, U32 count, const GLfloat* v) void LLGLSLShader::uniform2fv(U32 index, U32 count, const GLfloat* v) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1396,6 +1414,8 @@ void LLGLSLShader::uniform2fv(U32 index, U32 count, const GLfloat* v) void LLGLSLShader::uniform3fv(U32 index, U32 count, const GLfloat* v) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1420,6 +1440,8 @@ void LLGLSLShader::uniform3fv(U32 index, U32 count, const GLfloat* v) void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1445,6 +1467,8 @@ void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v) void LLGLSLShader::uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1463,6 +1487,8 @@ void LLGLSLShader::uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, c void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) @@ -1481,6 +1507,7 @@ void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, c void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); if (mProgramObject) { @@ -1500,6 +1527,8 @@ void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose, void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER; + llassert(sCurBoundShaderPtr == this); + if (mProgramObject) { if (mUniform.size() <= index) |