From a7a3a17b487045f29f276b4ae914ae988548d7f5 Mon Sep 17 00:00:00 2001 From: stossy11 Date: Wed, 2 Sep 2026 07:08:07 -0400 Subject: [PATCH] Fix fragment ClipDistance SPIR-V lookup - Fixed ClipDistance being treated as VTG gl_PerVertex block, Causing the lookup of Input.Position when it's undeclared. (cherry picked from commit 5d3e39208266c77a6db737638acfc6934baa331a) --- src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs index 8bae96ef7..f046796d5 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs @@ -1773,7 +1773,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv { (_, varType) = IoMap.GetSpirvBuiltIn(ioVariable); - if (IoMap.IsPerVertexBuiltIn(ioVariable)) + if (context.Definitions.Stage.IsVtg() && IoMap.IsPerVertexBuiltIn(ioVariable)) { perVertexBuiltIn = ioVariable; ioVariable = IoVariable.Position;