summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Madarasz (Graham Linden) <graham@lindenlab.com>2013-02-21 16:26:16 -0800
committerGraham Madarasz (Graham Linden) <graham@lindenlab.com>2013-02-21 16:26:16 -0800
commiteb41cf7f767baeb9ceceaad1c6474be3555d926b (patch)
treea82f6290a2825655cf3ed5322059dac5115c7001
parent543500c58592e04ba1ef017abd49ef67cab0797e (diff)
For MAINT-755 Fix for unbinding cubemap causing false alarm in tex type checking code (OS X RenderDebugGL crash) Code review: Dav3p
-rw-r--r--indra/newview/lldrawpoolbump.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 1b0b11298c..5a4f9591f7 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -449,9 +449,6 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32&
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
if( cube_map )
{
- cube_map->disable();
- cube_map->restoreMatrix();
-
if (!invisible && shader_level > 1)
{
shader->disableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
@@ -464,6 +461,10 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32&
}
}
}
+ // Moved below shader->disableTexture call to avoid false alarms from auto-re-enable of textures on stage 0
+ // MAINT-755
+ cube_map->disable();
+ cube_map->restoreMatrix();
}
if (!LLGLSLShader::sNoFixedFunction)