aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs
index 2370b49f..2a45e23d 100644
--- a/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs
+++ b/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs
@@ -188,10 +188,19 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
context.AppendLine();
}
- if (context.Config.Stage == ShaderStage.Fragment && context.Config.GpuAccessor.QueryEarlyZForce())
+ if (context.Config.Stage == ShaderStage.Fragment)
{
- context.AppendLine("layout(early_fragment_tests) in;");
- context.AppendLine();
+ if (context.Config.GpuAccessor.QueryEarlyZForce())
+ {
+ context.AppendLine("layout (early_fragment_tests) in;");
+ context.AppendLine();
+ }
+
+ if (context.Config.Properties.OriginUpperLeft)
+ {
+ context.AppendLine("layout (origin_upper_left) in vec4 gl_FragCoord;");
+ context.AppendLine();
+ }
}
if ((info.HelperFunctionsMask & HelperFunctionsMask.MultiplyHighS32) != 0)