summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-06-12 03:29:18 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2013-06-12 03:29:18 -0500
commit3ddd24872b7280a9ce9557c69c6ee49f23ed7a03 (patch)
treef4424a513eaacadf3c3305ae206d2a5a0dc09047 /Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
parente4a3919a2bfb0e5db5e9de64790f809d3de97244 (diff)
parentfa4ad82878d6ac416e1d1d5bd421ddc4399a6700 (diff)
Merge branch 'GLES3'
Conflicts: Source/Android/.idea/workspace.xml
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
index 2df1f47760..90cf401687 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
@@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#include "ProgramShaderCache.h"
+#include "DriverDetails.h"
#include "MathUtil.h"
#include "StreamBuffer.h"
#include "Debugger.h"
@@ -532,15 +533,15 @@ void ProgramShaderCache::CreateHeader ( void )
"%s\n"
"%s\n"
"#define COLOROUT(name) %s\n"
-
+
, v==GLSLES3 ? "300 es" : v==GLSL_120 ? "120" : v==GLSL_130 ? "130" : "140"
, v==GLSLES3 ? "precision highp float;" : ""
, v==GLSLES3 ? "" : v<=GLSL_130 ? "#extension GL_ARB_texture_rectangle : enable" : "#define texture2DRect texture"
, g_ActiveConfig.backend_info.bSupportsGLSLUBO && v<GLSL_140 ? "#extension GL_ARB_uniform_buffer_object : enable" : ""
, v==GLSL_120 ? "attribute" : "in"
, v==GLSL_120 ? "attribute" : "out"
- , v==GLSL_120 ? "varying" : "centroid in"
- , v==GLSL_120 ? "varying" : "centroid out"
+ , DriverDetails::HasBug(DriverDetails::BUG_BROKENCENTROID) ? "in" : v==GLSL_120 ? "varying" : "centroid in"
+ , DriverDetails::HasBug(DriverDetails::BUG_BROKENCENTROID) ? "out" : v==GLSL_120 ? "varying" : "centroid out"
, v==GLSL_120 ? "#define texture texture2D" : ""
, v==GLSL_120 ? "#define round(x) floor((x)+0.5f)" : ""
, v==GLSL_120 ? "#define out " : ""