summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-10-06 12:53:26 -0500
committerDave Parks <davep@lindenlab.com>2010-10-06 12:53:26 -0500
commit21b1b91c448b7d148a840c06d74deabc45af1819 (patch)
tree52f3a1fc75487d1841cd515b7f46a17ec4cc8173 /indra/llrender
parent478e0927c87338e02e75d3791f51ad2b4e7b8c74 (diff)
ATI compatibility pass
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llglslshader.cpp13
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)