summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorleyla_linden <none@none>2011-02-08 15:00:42 -0800
committerleyla_linden <none@none>2011-02-08 15:00:42 -0800
commit9cd092544f6f4183af19132ed68111bd8d31a89f (patch)
treea54dc1f5aa121192d81e8d7111930e7d464e2140 /indra
parent3f77074f27ed96ee817e00d026145942da9a1ecb (diff)
SH-545 [REGRESSION] Enabled Basic Shaders Can Cause an Unrecoverable System Lock Up
originally done in http://bitbucket.org/leyla/leyla-mesh-development
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llgl.cpp8
-rw-r--r--indra/newview/llfloaterpreference.cpp9
2 files changed, 14 insertions, 3 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 9022026248..f91584b5e4 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -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);
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 92d6d9a486..3673a28163 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -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);