summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/GeometryShaderGen.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2016-03-29 13:35:16 +1000
committerStenzek <stenzek@gmail.com>2016-03-30 00:42:50 +1000
commite6b2212ec0240c8d00ec2f72b84c037db94bfccb (patch)
tree61518f1f88daa9b4c09e7c4d21e5311af63e0f40 /Source/Core/VideoCommon/GeometryShaderGen.cpp
parent6d420542741ae9046ce6040001204b49fb88db68 (diff)
ShaderGen: Only specify storage qualifier in interface block when needed
Drivers that don't support GL_ARB_shading_language_420pack require that the storage qualifier be specified even when inside an interface block. AMD's driver throws a compile error when "centroid in/out" is used within an interface block. Our previous behavior was to include the storage qualifier regardless, but this wasn't working on AMD, therefore we should check for the presence of the extension and include based on this, instead.
Diffstat (limited to 'Source/Core/VideoCommon/GeometryShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/GeometryShaderGen.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/GeometryShaderGen.cpp b/Source/Core/VideoCommon/GeometryShaderGen.cpp
index de76557d5e..4d551f5d16 100644
--- a/Source/Core/VideoCommon/GeometryShaderGen.cpp
+++ b/Source/Core/VideoCommon/GeometryShaderGen.cpp
@@ -90,16 +90,15 @@ static T GenerateGeometryShader(u32 primitive_type, API_TYPE ApiType)
if (g_ActiveConfig.backend_info.bSupportsGSInstancing)
out.Write("#define InstanceID gl_InvocationID\n");
- out.Write("// The interface block qualifier is duplicated to its member due to Apple OS X bug 24983074\n");
out.Write("in VertexData {\n");
- GenerateVSOutputMembers<T>(out, ApiType, "in", GetInterpolationQualifier());
+ GenerateVSOutputMembers<T>(out, ApiType, GetInterpolationQualifier(true, true));
out.Write("} vs[%d];\n", vertex_in);
out.Write("out VertexData {\n");
- GenerateVSOutputMembers<T>(out, ApiType, "out", GetInterpolationQualifier());
+ GenerateVSOutputMembers<T>(out, ApiType, GetInterpolationQualifier(true, false));
if (g_ActiveConfig.iStereoMode > 0)
- out.Write("\tflat out int layer;\n");
+ out.Write("\tflat int layer;\n");
out.Write("} ps;\n");