For MAINT-755 Fix for unbinding cubemap causing false alarm in tex type checking code (OS X RenderDebugGL crash) Code review: Dav3p

meow-7.2.2
Graham Madarasz (Graham Linden) 2013-02-21 16:26:16 -08:00
parent 543500c585
commit eb41cf7f76
1 changed files with 4 additions and 3 deletions

View File

@ -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)