summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-25 00:20:12 -0500
committerDave Parks <davep@lindenlab.com>2011-09-25 00:20:12 -0500
commitf6744182511d68ccc135174b1999d3e4ae260881 (patch)
tree44c8c92328222452efa1d8bb9533f40cd38d330b /indra
parente5d06b446459fd9f2afc077023f866dffd7c3c98 (diff)
SH-2244 Fix for UI blanking out on shader reload (stale matrix hash cleanup)
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llglslshader.cpp13
-rw-r--r--indra/llrender/llrender.cpp3
2 files changed, 9 insertions, 7 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index da4658dc03..674d6dcf7e 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -76,11 +76,7 @@ hasAlphaMask(false)
LLGLSLShader::LLGLSLShader()
: mProgramObject(0), mActiveTextureChannels(0), mShaderLevel(0), mShaderGroup(SG_DEFAULT), mUniformsDirty(FALSE)
{
- for (U32 i = 0; i < LLRender::NUM_MATRIX_MODES; ++i)
- {
- mMatHash[i] = 0xFFFFFFFF;
- }
- mLightHash = 0xFFFFFFFF;
+
}
void LLGLSLShader::unload()
@@ -116,6 +112,13 @@ void LLGLSLShader::unload()
BOOL LLGLSLShader::createShader(vector<string> * attributes,
vector<string> * uniforms)
{
+ //reloading, reset matrix hash values
+ for (U32 i = 0; i < LLRender::NUM_MATRIX_MODES; ++i)
+ {
+ mMatHash[i] = 0xFFFFFFFF;
+ }
+ mLightHash = 0xFFFFFFFF;
+
llassert_always(!mShaderFiles.empty());
BOOL success = TRUE;
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 13e7c6094c..613d159901 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1039,7 +1039,6 @@ LLRender::LLRender()
mMatIdx[i] = 0;
mMatHash[i] = 0;
mCurMatHash[i] = 0xFFFFFFFF;
- mMatrix[i][0].make_identity();
}
mLightHash = 0;
@@ -1228,7 +1227,7 @@ void LLRender::syncMatrices()
syncLightState();
}
}
- else
+ else if (!LLGLSLShader::sNoFixedFunction)
{
for (U32 i = 0; i < 2; ++i)
{