Fix geometry shader passthrough issue (Diagnosed by gdkchan)

This commit is contained in:
unknown 2024-03-12 01:30:04 -03:00
parent 8354434a37
commit 732005edcb

View file

@ -422,6 +422,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
context.MemberDecorate(perVertexStructType, 2, Decoration.BuiltIn, (LiteralInteger)BuiltIn.ClipDistance);
context.MemberDecorate(perVertexStructType, 3, Decoration.BuiltIn, (LiteralInteger)BuiltIn.CullDistance);
if (context.Definitions.Stage == ShaderStage.Geometry
&& context.Definitions.GpPassthrough
&& context.HostCapabilities.SupportsGeometryShaderPassthrough)
{
context.MemberDecorate(perVertexStructType, 0, Decoration.PassthroughNV);
context.MemberDecorate(perVertexStructType, 1, Decoration.PassthroughNV);
context.MemberDecorate(perVertexStructType, 2, Decoration.PassthroughNV);
context.MemberDecorate(perVertexStructType, 3, Decoration.PassthroughNV);
}
return perVertexStructType;
}