diff options
author | Oz Linden <oz@lindenlab.com> | 2013-04-09 17:09:52 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-04-09 17:09:52 -0400 |
commit | 8f84d75ae42f4bb6f3305c64e95bc4a070b774a6 (patch) | |
tree | ae3696ae60547d60516f0847c59a1bbaad73b5e9 | |
parent | 0229b65a4d40287454bd690a414b6ce8f63856ea (diff) | |
parent | 991a3cf40eb22559f89808a87fdeda1d44eaaf8f (diff) |
merge fixes from graham
-rw-r--r-- | NORSPEC-59-HACK.patch | 21 | ||||
-rw-r--r-- | indra/llrender/llgl.cpp | 11 | ||||
-rw-r--r-- | indra/llrender/llgl.h | 5 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 4 |
5 files changed, 48 insertions, 7 deletions
diff --git a/NORSPEC-59-HACK.patch b/NORSPEC-59-HACK.patch new file mode 100644 index 0000000000..e2d9e8d9e7 --- /dev/null +++ b/NORSPEC-59-HACK.patch @@ -0,0 +1,21 @@ +diff -r 0b4f135cdbe8 indra/newview/llvoavatar.cpp +--- a/indra/newview/llvoavatar.cpp Thu Apr 04 09:18:46 2013 -0700 ++++ b/indra/newview/llvoavatar.cpp Sat Apr 06 05:18:35 2013 -0700 +@@ -4336,6 +4336,7 @@ + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + } + ++#if !LL_DARWIN + if (!isSelf() || gAgent.needsRenderHead() || LLPipeline::sShadowRender) + { + if (LLPipeline::sImpostorRender) +@@ -4362,7 +4363,8 @@ + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + } + } +- ++#endif ++ + return num_indices; + } + diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 9967c23ce8..5429489075 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -445,7 +445,9 @@ LLGLManager::LLGLManager() : mIsGFFX(FALSE), mATIOffsetVerticalLines(FALSE), mATIOldDriver(FALSE), - +#if LL_DARWIN + mIsMobileGF(FALSE), +#endif mHasRequirements(TRUE), mHasSeparateSpecularColor(FALSE), @@ -637,6 +639,13 @@ bool LLGLManager::initGL() { mIsGF3 = TRUE; } +#if LL_DARWIN + else if ((mGLRenderer.find("9400M") != std::string::npos) + || (mGLRenderer.find("9600M") != std::string::npos)) + { + mIsMobileGF = TRUE; + } +#endif } else if (mGLVendor.find("INTEL") != std::string::npos diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index 1e921d1e97..767d49cbf2 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -128,6 +128,11 @@ public: BOOL mATIOffsetVerticalLines; BOOL mATIOldDriver; +#if LL_DARWIN + // Needed to distinguish problem cards on older Macs that break with Materials + BOOL mIsMobileGF; +#endif + // Whether this version of GL is good enough for SL to use BOOL mHasRequirements; 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); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a3093f069d..9d16c28e2f 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4336,6 +4336,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } +#if !LL_DARWIN if (!isSelf() || gAgent.needsRenderHead() || LLPipeline::sShadowRender) { if (LLPipeline::sImpostorRender) @@ -4362,7 +4363,8 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } } - +#endif + return num_indices; } |