summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
authorEuclid Linden <euclid@lindenlab.com>2021-12-01 15:59:02 +0000
committerEuclid Linden <euclid@lindenlab.com>2021-12-01 15:59:02 +0000
commit3f82f7ce3d4fb51407f366b2ad2f15d990de40b2 (patch)
tree45be0f3213f0e095d9a7929c693f4671c8b58e08 /indra/llrender/llshadermgr.cpp
parent01317a2faded53c79db7e0814426f1d8b2fd12fc (diff)
parentabd7d80048529fd971e1b65ea3afe0f7e78bd356 (diff)
Merged in euclid-pre-16386 (pull request #793)
Purge LLGLSLShader::sNoFixedFunction, and all that flows from it. No functional changes. Approved-by: Michael Pohoreski Approved-by: Dave Parks
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r--indra/llrender/llshadermgr.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index a9a4314afa..6a53662619 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -1054,43 +1054,6 @@ BOOL LLShaderMgr::linkProgramObject(GLhandleARB obj, BOOL suppress_errors)
LL_SHADER_LOADING_WARNS() << "GLSL Linker Error:" << LL_ENDL;
}
-#if LL_DARWIN
-
- // For some reason this absolutely kills the frame rate when VBO's are enabled
- if (0)
- {
- // Force an evaluation of the gl state so the driver can tell if the shader will run in hardware or software
- // per Apple's suggestion
- LLGLSLShader::sNoFixedFunction = false;
-
- glUseProgramObjectARB(obj);
-
- gGL.begin(LLRender::TRIANGLES);
- gGL.vertex3f(0.0f, 0.0f, 0.0f);
- gGL.vertex3f(0.0f, 0.0f, 0.0f);
- gGL.vertex3f(0.0f, 0.0f, 0.0f);
- gGL.end();
- gGL.flush();
-
- glUseProgramObjectARB(0);
-
- LLGLSLShader::sNoFixedFunction = true;
-
- // Query whether the shader can or cannot run in hardware
- // http://developer.apple.com/qa/qa2007/qa1502.html
- GLint vertexGPUProcessing, fragmentGPUProcessing;
- CGLContextObj ctx = CGLGetCurrentContext();
- CGLGetParameter(ctx, kCGLCPGPUVertexProcessing, &vertexGPUProcessing);
- CGLGetParameter(ctx, kCGLCPGPUFragmentProcessing, &fragmentGPUProcessing);
- if (!fragmentGPUProcessing || !vertexGPUProcessing)
- {
- LL_SHADER_LOADING_WARNS() << "GLSL Linker: Running in Software:" << LL_ENDL;
- success = GL_FALSE;
- suppress_errors = FALSE;
- }
- }
-
-#else
std::string log = get_object_log(obj);
LLStringUtil::toLower(log);
if (log.find("software") != std::string::npos)
@@ -1099,7 +1062,6 @@ BOOL LLShaderMgr::linkProgramObject(GLhandleARB obj, BOOL suppress_errors)
success = GL_FALSE;
suppress_errors = FALSE;
}
-#endif
return success;
}