diff options
author | Dave Parks <davep@lindenlab.com> | 2012-02-17 15:06:48 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-02-17 15:06:48 -0600 |
commit | 8d12038ef674dca701f313431b1089458816f638 (patch) | |
tree | e7941086e7703b4691c640ca2bd6d19e0af43e45 /indra | |
parent | 9dde773a5a6b7dd8c48dd373774935c2d8415fef (diff) |
SH-2908 Potential fix for precision complaints from some AMD OpenGL 3.1 implementations.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 269f78c8cd..9aeb1a99f8 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -611,6 +611,9 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade { //set version to 1.30 text[count++] = strdup("#version 130\n"); + + //some implementations of GLSL 1.30 require integer precision be explicitly declared + text[count++] = strdup("precision mediump int;\n"); } else { //set version to 400 @@ -663,7 +666,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade . uniform sampler2D texN; - VARYING ivec4 vary_texture_index; + VARYING_FLAT ivec4 vary_texture_index; vec4 diffuseLookup(vec2 texcoord) { diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index c84fb8facb..06db644851 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -413,6 +413,8 @@ void LLViewerShaderMgr::setShaders() // Shaders LL_INFOS("ShaderLoading") << "\n~~~~~~~~~~~~~~~~~~\n Loading Shaders:\n~~~~~~~~~~~~~~~~~~" << LL_ENDL; + LL_INFOS("ShaderLoading") << llformat("Using GLSL %d.%d", gGLManager.mGLSLVersionMajor, gGLManager.mGLSLVersionMinor) << llendl; + for (S32 i = 0; i < SHADER_COUNT; i++) { mVertexShaderLevel[i] = 0; |