From 461c24092ae6e148d896c18aa3e86220c89981f8 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Tue, 1 Dec 2020 23:13:27 +0000 Subject: Implement Force Early Z Register (#1755) --- Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Ryujinx.Graphics.Shader/CodeGen') diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs index 825564b8..d43fe632 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs @@ -141,6 +141,12 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl { if (context.Config.Stage == ShaderStage.Fragment) { + if (context.Config.GpuAccessor.QueryEarlyZForce()) + { + context.AppendLine("layout(early_fragment_tests) in;"); + context.AppendLine(); + } + context.AppendLine($"uniform bool {DefaultNames.IsBgraName}[8];"); context.AppendLine(); } -- cgit v1.2.3