summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/UberShaderPixel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/UberShaderPixel.cpp')
-rw-r--r--Source/Core/VideoCommon/UberShaderPixel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/UberShaderPixel.cpp b/Source/Core/VideoCommon/UberShaderPixel.cpp
index 21309bc8b3..0bf4b3072c 100644
--- a/Source/Core/VideoCommon/UberShaderPixel.cpp
+++ b/Source/Core/VideoCommon/UberShaderPixel.cpp
@@ -135,6 +135,8 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config,
GetInterpolationQualifier(msaa, ssaa, true, true), ShaderStage::Pixel);
out.Write("}};\n\n");
+ if (stereo && !host_config.backend_gl_layer_in_fs)
+ out.Write("flat in int layer;");
}
else
{
@@ -532,7 +534,8 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config,
if (host_config.backend_geometry_shaders && stereo)
{
- out.Write("\tint layer = gl_Layer;\n");
+ if (host_config.backend_gl_layer_in_fs)
+ out.Write("\tint layer = gl_Layer;\n");
}
else
{