diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-04-09 12:37:57 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-04-09 12:37:57 -0700 |
commit | 893bcf34f7daa432ce70224b4d30d3c22f9c80ad (patch) | |
tree | 3bbf7b5f40388e3fc3df39ed7cba8879b79a7239 /indra/newview/llviewershadermgr.cpp | |
parent | 73aa45d1058724460aa89b14a48ec87ce53a85f4 (diff) |
NORSPEC-59 work around nV driver crash when doing deferred rendering on NV 9400M/9600M
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 286152867f..ce066d85f1 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -783,9 +783,6 @@ BOOL LLViewerShaderMgr::loadBasicShaders() // Load basic dependency shaders first // All of these have to load for any shaders to function -#if LL_DARWIN // Mac can't currently handle all 8 lights, - S32 sum_lights_class = 2; -#else S32 sum_lights_class = 3; // class one cards will get the lower sum lights @@ -796,14 +793,21 @@ BOOL LLViewerShaderMgr::loadBasicShaders() { sum_lights_class = 2; } -#endif // If we have sun and moon only checked, then only sum those lights. if (gPipeline.getLightingDetail() == 0) { sum_lights_class = 1; } - + +#if LL_DARWIN + // Work around driver crashes on older Macs when using deferred rendering + // NORSPEC-59 + // + if (gGLManager.mIsMobileGF) + sum_lights_class = 3; +#endif + // Use the feature table to mask out the max light level to use. Also make sure it's at least 1. S32 max_light_class = gSavedSettings.getS32("RenderShaderLightingMaxLevel"); sum_lights_class = llclamp(sum_lights_class, 1, max_light_class); |