diff options
author | Graham Linden <graham@lindenlab.com> | 2013-07-23 04:52:59 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2013-07-23 04:52:59 -0700 |
commit | fa74313e7db1132cd76313864d72aac27902a126 (patch) | |
tree | b7163858585d78565f4ecda4f26f40d075f6ed9a /indra | |
parent | 920ca152c662eec12f0e6bcc4fd19feb978e88d4 (diff) |
NORSPEC-314 WIP make work-around easier to flip and add 9800M as an evil mac
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/llrender/llgl.cpp | 3 | ||||
-rwxr-xr-x | indra/newview/lldrawpoolsimple.cpp | 40 |
2 files changed, 36 insertions, 7 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 088ba95b75..351fd98ced 100755 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -647,7 +647,8 @@ bool LLGLManager::initGL() } #if LL_DARWIN else if ((mGLRenderer.find("9400M") != std::string::npos) - || (mGLRenderer.find("9600M") != std::string::npos)) + || (mGLRenderer.find("9600M") != std::string::npos) + || (mGLRenderer.find("9800M") != std::string::npos)) { mIsMobileGF = TRUE; } diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index d51b84cfbc..06e8a3537a 100755 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -37,6 +37,7 @@ #include "llviewershadermgr.h" #include "llrender.h" +#define GE_FORCE_WORKAROUND LL_DARWIN static LLGLSLShader* simple_shader = NULL; static LLGLSLShader* fullbright_shader = NULL; @@ -654,7 +655,20 @@ void LLDrawPoolFullbrightAlphaMask::beginPostDeferredPass(S32 pass) gObjectFullbrightAlphaMaskProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, 1.0f); } else - { + { + +#if GE_FORCE_WORKAROUND + // Work-around until we can figure out why the right shader causes + // the GeForce driver to go tango uniform on OS X 10.6.8 only + // + if (gGLManager.mIsMobileGF) + { + gObjectFullbrightAlphaMaskProgram.bind(); + gObjectFullbrightAlphaMaskProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f); + return; + } +#endif + if (LLPipeline::sUnderWaterRender) { gDeferredFullbrightAlphaMaskWaterProgram.bind(); @@ -665,7 +679,6 @@ void LLDrawPoolFullbrightAlphaMask::beginPostDeferredPass(S32 pass) gDeferredFullbrightAlphaMaskProgram.bind(); gDeferredFullbrightAlphaMaskProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f); } - } } @@ -685,11 +698,26 @@ void LLDrawPoolFullbrightAlphaMask::endPostDeferredPass(S32 pass) } else { -#if LL_DARWIN - gObjectFullbrightAlphaMaskProgram.unbind(); -#else - gDeferredFullbrightAlphaMaskProgram.unbind(); + +#if GE_FORCE_WORKAROUND + // Work-around until we can figure out why the right shader causes + // the GeForce driver to go tango uniform on OS X 10.6.8 only + // + if (gGLManager.mIsMobileGF) + { + gObjectFullbrightAlphaMaskProgram.unbind(); + } + else #endif + if (LLPipeline::sUnderWaterRender) + { + gDeferredFullbrightAlphaMaskWaterProgram.unbind(); + } + else + { + gDeferredFullbrightAlphaMaskProgram.unbind(); + } + } LLRenderPass::endRenderPass(pass); } |