summaryrefslogtreecommitdiff
path: root/indra/newview/llviewershadermgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewershadermgr.cpp')
-rwxr-xr-xindra/newview/llviewershadermgr.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 7d7889845d..ef5ccb5120 100755
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -640,6 +640,7 @@ void LLViewerShaderMgr::unloadShaders()
gTwoTextureAddProgram.unload();
gOneTextureNoColorProgram.unload();
gSolidColorProgram.unload();
+ gSolidColorProgramIntel.unload();
gObjectFullbrightNoColorProgram.unload();
gObjectFullbrightNoColorWaterProgram.unload();
@@ -2703,6 +2704,24 @@ BOOL LLViewerShaderMgr::loadShadersInterface()
}
}
+ // When running with a intel gfx card, do not use the solidcolor?.glsl files. Instead use a custom one
+ // for those cards. Passing color as a uniform and not a shader attribute
+ if (success)
+ {
+ gSolidColorProgramIntel.mName = "Solid Color Shader for Intel";
+ gSolidColorProgramIntel.mShaderFiles.clear();
+ gSolidColorProgramIntel.mShaderFiles.push_back(make_pair("interface/solidcolorIntelV.glsl", GL_VERTEX_SHADER_ARB));
+ gSolidColorProgramIntel.mShaderFiles.push_back(make_pair("interface/solidcolorF.glsl", GL_FRAGMENT_SHADER_ARB)); // The standard fragment shader is just fine. So keep it.
+ gSolidColorProgramIntel.mShaderLevel = mVertexShaderLevel[SHADER_INTERFACE];
+ success = gSolidColorProgramIntel.createShader(NULL, NULL);
+ if (success)
+ {
+ gSolidColorProgramIntel.bind();
+ gSolidColorProgramIntel.uniform1i(sTex0, 0);
+ gSolidColorProgramIntel.unbind();
+ }
+ }
+
if (success)
{
gOcclusionProgram.mName = "Occlusion Shader";