summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-03-30 23:27:24 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2013-03-30 23:27:24 -0500
commit31500f252212a5aa3ffb779b7bac52a14f25908c (patch)
tree467106a98c59d2c67e8c24c921f5a38aef9c81f1 /Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
parent6958822f1957786dcee4adbb36653539f6eb149e (diff)
Fix Intel Ironlake since it doesn't support version 120 of GLSL. I don't have Ironlake so it is hard to test. Dropping the shaders to version 120 worked here for me, ATI may be giving me some slack though.
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
index 4c516853d7..5f4df23eca 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
@@ -496,6 +496,10 @@ void ProgramShaderCache::CreateHeader ( void )
#else
bool glsl140_hack = false;
#endif
+ // Intel HD Graphics on the Ironlake chipset has been abandoned by Intel
+ // It supports every feature we need but not GLSL 1.3
+ // This is to check if it is Ironlake then drop to GLSL 1.2
+ bool glsl120_hack = strstr(g_ogl_config.gl_renderer, "Ironlake") != 0;
snprintf(s_glsl_header, sizeof(s_glsl_header),
"#version %s\n"
@@ -519,7 +523,7 @@ void ProgramShaderCache::CreateHeader ( void )
"#define lerp(x, y, z) mix(x, y, z)\n"
- , glsl140_hack ? "140" : "130"
+ , glsl120_hack ? "120" : glsl140_hack ? "140" : "130"
, glsl140_hack ? "#define texture2DRect texture" : "#extension GL_ARB_texture_rectangle : enable"
, g_ActiveConfig.backend_info.bSupportsGLSLUBO && !glsl140_hack ? "#extension GL_ARB_uniform_buffer_object : enable" : "// ubo disabled"
);