diff options
author | Dave Parks <davep@lindenlab.com> | 2010-10-06 12:53:26 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-10-06 12:53:26 -0500 |
commit | 21b1b91c448b7d148a840c06d74deabc45af1819 (patch) | |
tree | 52f3a1fc75487d1841cd515b7f46a17ec4cc8173 /indra/llrender | |
parent | 478e0927c87338e02e75d3791f51ad2b4e7b8c74 (diff) |
ATI compatibility pass
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index f59bac8c3c..ac56bea275 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -704,6 +704,7 @@ void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, c GLint LLGLSLShader::getUniformLocation(const string& uniform) { + GLint ret = -1; if (mProgramObject > 0) { std::map<string, GLint>::iterator iter = mUniformMap.find(uniform); @@ -718,11 +719,19 @@ GLint LLGLSLShader::getUniformLocation(const string& uniform) } stop_glerror(); } - return iter->second; + ret = iter->second; } } - return -1; + if (gDebugGL) + { + if (ret == -1 && ret != glGetUniformLocationARB(mProgramObject, uniform.c_str())) + { + llerrs << "Uniform map invalid." << llendl; + } + } + + return ret; } GLint LLGLSLShader::getAttribLocation(U32 attrib) |