SH-545 [REGRESSION] Enabled Basic Shaders Can Cause an Unrecoverable System Lock Up

originally done in http://bitbucket.org/leyla/leyla-mesh-development
meow-7.2.2
leyla_linden 2011-02-08 15:00:42 -08:00
parent 3f77074f27
commit 9cd092544f
2 changed files with 14 additions and 3 deletions

View File

@ -671,7 +671,15 @@ void LLGLManager::initExtensions()
mHasVertexBufferObject = ExtensionExists("GL_ARB_vertex_buffer_object", gGLHExts.mSysExts);
mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts);
// mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad
#ifdef GL_ARB_framebuffer_object
mHasFramebufferObject = ExtensionExists("GL_ARB_framebuffer_object", gGLHExts.mSysExts);
#else
mHasFramebufferObject = ExtensionExists("GL_EXT_framebuffer_object", gGLHExts.mSysExts) &&
ExtensionExists("GL_EXT_framebuffer_blit", gGLHExts.mSysExts) &&
ExtensionExists("GL_EXT_framebuffer_multisample", gGLHExts.mSysExts) &&
ExtensionExists("GL_EXT_packed_depth_stencil", gGLHExts.mSysExts);
#endif
mHasDrawBuffers = ExtensionExists("GL_ARB_draw_buffers", gGLHExts.mSysExts);
mHasBlendFuncSeparate = ExtensionExists("GL_EXT_blend_func_separate", gGLHExts.mSysExts);
mHasTextureRectangle = ExtensionExists("GL_ARB_texture_rectangle", gGLHExts.mSysExts);

View File

@ -1043,8 +1043,10 @@ void LLFloaterPreference::refreshEnabledState()
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
shaders)
if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
shaders &&
gGLManager.mHasFramebufferObject)
{
BOOL enabled = (ctrl_wind_light->get()) ? TRUE : FALSE;
@ -1127,7 +1129,8 @@ void LLFloaterPreference::disableUnavailableSettings()
}
// disabled deferred
if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"))
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") ||
!gGLManager.mHasFramebufferObject)
{
ctrl_shadows->setEnabled(FALSE);
ctrl_shadows->setValue(0);