summaryrefslogtreecommitdiff
path: root/indra/llrender/llglslshader.cpp
diff options
context:
space:
mode:
authorGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-05-01 00:10:11 +0100
committerGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-05-01 00:10:11 +0100
commit3116416fcb8dfd54ef2807e9e75959429c946d79 (patch)
tree5fe7a724ac283796faff1e8bfdc2602238047deb /indra/llrender/llglslshader.cpp
parent21ddbd64af44672e4b20dc4cdf99fd1fbc5c07c2 (diff)
Le Merge
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r--indra/llrender/llglslshader.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 73ab95cf3b..95e1274c16 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -33,6 +33,8 @@
#include "llrender.h"
#include "llvertexbuffer.h"
+#pragma optimize("", off)
+
#if LL_DARWIN
#include "OpenGL/OpenGL.h"
#endif
@@ -659,7 +661,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString> *
mUniformMap[hashedName] = location;
LL_DEBUGS("ShaderLoading") << "Uniform " << name << " is at location " << location << LL_ENDL;
-
+
//find the index of this uniform
for (S32 i = 0; i < (S32) LLShaderMgr::instance()->mReservedUniforms.size(); i++)
{
@@ -683,7 +685,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString> *
std::pair<uniforms_index_t::iterator, bool> result;
S32 index = i + LLShaderMgr::instance()->mReservedUniforms.size();
- if ((*uniforms)[i].String() == name)
+ if ((*uniforms)[i] == hashedName)
{
result = mUniform.insert(uniforms_index_t::value_type(index, location));
if (result.second)
@@ -1218,7 +1220,6 @@ void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, c
if (mProgramObject)
{
GLint location = getLocationForIndex(index);
-
if (location >= 0)
{
glUniformMatrix4fvARB(location, count, transpose, v);