summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2014-12-19 18:24:33 +0100
committerJules Blok <jules.blok@gmail.com>2014-12-19 22:45:39 +0100
commit0d79e8f32b1dd3f03fdcb857cd7e5c9b7ce30dfe (patch)
tree358e64555f387fa7bf2274137665ed439077ebb2 /Source/Core
parentca18e51450a8155bb66cf0816f25057717a792c6 (diff)
VideoCommon: Don't specify the redundant in/out qualifier if GL_ARB_shading_language_420pack is supported.
Some driver developers interpreted "can" as "must" in the OpenGL specs. (I'm looking at you AMD)
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/GeometryShaderGen.cpp4
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp2
-rw-r--r--Source/Core/VideoCommon/VertexShaderGen.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/GeometryShaderGen.cpp b/Source/Core/VideoCommon/GeometryShaderGen.cpp
index bcd7758fba..f2b102038e 100644
--- a/Source/Core/VideoCommon/GeometryShaderGen.cpp
+++ b/Source/Core/VideoCommon/GeometryShaderGen.cpp
@@ -88,11 +88,11 @@ static inline void GenerateGeometryShader(T& out, u32 primitive_type, API_TYPE A
out.Write("#define InstanceID gl_InvocationID\n");
out.Write("in VertexData {\n");
- out.Write("\tcentroid in VS_OUTPUT o;\n");
+ out.Write("\tcentroid %s VS_OUTPUT o;\n", g_ActiveConfig.backend_info.bSupportsBindingLayout ? "" : "in");
out.Write("} vs[%d];\n", vertex_in);
out.Write("out VertexData {\n");
- out.Write("\tcentroid out VS_OUTPUT o;\n");
+ out.Write("\tcentroid %s VS_OUTPUT o;\n", g_ActiveConfig.backend_info.bSupportsBindingLayout ? "" : "out");
if (g_ActiveConfig.iStereoMode > 0)
out.Write("\tflat int layer;\n");
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp
index 4a63c7a977..1c0befd1fd 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -320,7 +320,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
if (g_ActiveConfig.backend_info.bSupportsGeometryShaders)
{
out.Write("in VertexData {\n");
- out.Write("\tcentroid in VS_OUTPUT o;\n");
+ out.Write("\tcentroid %s VS_OUTPUT o;\n", g_ActiveConfig.backend_info.bSupportsBindingLayout ? "" : "in");
if (g_ActiveConfig.iStereoMode > 0)
out.Write("\tflat int layer;\n");
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp
index f14cd559da..10ebc89f86 100644
--- a/Source/Core/VideoCommon/VertexShaderGen.cpp
+++ b/Source/Core/VideoCommon/VertexShaderGen.cpp
@@ -75,8 +75,8 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
if (g_ActiveConfig.backend_info.bSupportsGeometryShaders)
{
out.Write("out VertexData {\n"
- "\tcentroid out VS_OUTPUT o;\n"
- "};\n");
+ "\tcentroid %s VS_OUTPUT o;\n"
+ "};\n", g_ActiveConfig.backend_info.bSupportsBindingLayout ? "" : "out");
}
else
{