diff options
| author | Nicolas Abram <abramlujan@gmail.com> | 2024-03-13 17:26:19 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-13 17:26:19 -0300 |
| commit | d9a18919b051a3cfa4b3c9f5f2a2fb0e8eecfcd5 (patch) | |
| tree | 34727a718c30914eb795758926d228ce745f87bc /src/Ryujinx.Graphics.Shader | |
| parent | 8354434a37abe28e587a3f515b1e2009d1b4e8c2 (diff) | |
Fix geometry shader passthrough issue (#6462)
* Fix geometry shader passthrough issue (Diagnosed by gdkchan)
* Fix whitespace formatting
* Fix whitespace formatting
* Bump shader cache version
* Don't apply PassthroughNV decorations to output geometry shader variables
Diffstat (limited to 'src/Ryujinx.Graphics.Shader')
| -rw-r--r-- | src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs index 4ff61d9f..b7482425 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Spirv/Declarations.cs @@ -356,6 +356,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv context.AddGlobalVariable(perVertexInputVariable); context.Inputs.Add(new IoDefinition(StorageKind.Input, IoVariable.Position), perVertexInputVariable); + + if (context.Definitions.Stage == ShaderStage.Geometry && + context.Definitions.GpPassthrough && + context.HostCapabilities.SupportsGeometryShaderPassthrough) + { + context.MemberDecorate(perVertexInputStructType, 0, Decoration.PassthroughNV); + context.MemberDecorate(perVertexInputStructType, 1, Decoration.PassthroughNV); + context.MemberDecorate(perVertexInputStructType, 2, Decoration.PassthroughNV); + context.MemberDecorate(perVertexInputStructType, 3, Decoration.PassthroughNV); + } } var perVertexOutputStructType = CreatePerVertexStructType(context); |
