mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-25 03:25:13 +00:00
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
This commit is contained in:
parent
8354434a37
commit
d9a18919b0
2 changed files with 11 additions and 1 deletions
|
@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
||||||
private const ushort FileFormatVersionMajor = 1;
|
private const ushort FileFormatVersionMajor = 1;
|
||||||
private const ushort FileFormatVersionMinor = 2;
|
private const ushort FileFormatVersionMinor = 2;
|
||||||
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
|
||||||
private const uint CodeGenVersion = 6455;
|
private const uint CodeGenVersion = 6462;
|
||||||
|
|
||||||
private const string SharedTocFileName = "shared.toc";
|
private const string SharedTocFileName = "shared.toc";
|
||||||
private const string SharedDataFileName = "shared.data";
|
private const string SharedDataFileName = "shared.data";
|
||||||
|
|
|
@ -356,6 +356,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
|
|
||||||
context.AddGlobalVariable(perVertexInputVariable);
|
context.AddGlobalVariable(perVertexInputVariable);
|
||||||
context.Inputs.Add(new IoDefinition(StorageKind.Input, IoVariable.Position), 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);
|
var perVertexOutputStructType = CreatePerVertexStructType(context);
|
||||||
|
|
Loading…
Reference in a new issue