From 51a27032f01826e0cec56c53da4359fd2c38c8f3 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 11 Nov 2022 13:22:49 -0300 Subject: Fix VertexId and InstanceId on Vulkan (#3833) * Fix VertexId and InstanceId on Vulkan * Shader cache version bump --- Ryujinx.Graphics.Shader/Translation/AttributeConsts.cs | 5 +++++ Ryujinx.Graphics.Shader/Translation/AttributeInfo.cs | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'Ryujinx.Graphics.Shader/Translation') diff --git a/Ryujinx.Graphics.Shader/Translation/AttributeConsts.cs b/Ryujinx.Graphics.Shader/Translation/AttributeConsts.cs index f4e39d0d..47367f89 100644 --- a/Ryujinx.Graphics.Shader/Translation/AttributeConsts.cs +++ b/Ryujinx.Graphics.Shader/Translation/AttributeConsts.cs @@ -95,5 +95,10 @@ namespace Ryujinx.Graphics.Shader.Translation public const int LtMask = 0x2000040; public const int ThreadKill = 0x2000044; + + public const int BaseInstance = 0x2000050; + public const int BaseVertex = 0x2000054; + public const int InstanceIndex = 0x2000058; + public const int VertexIndex = 0x200005c; } } \ No newline at end of file diff --git a/Ryujinx.Graphics.Shader/Translation/AttributeInfo.cs b/Ryujinx.Graphics.Shader/Translation/AttributeInfo.cs index 35dd56e8..6e95722f 100644 --- a/Ryujinx.Graphics.Shader/Translation/AttributeInfo.cs +++ b/Ryujinx.Graphics.Shader/Translation/AttributeInfo.cs @@ -27,6 +27,10 @@ namespace Ryujinx.Graphics.Shader.Translation { AttributeConsts.TessCoordY, new AttributeInfo(AttributeConsts.TessCoordX, 1, 3, AggregateType.Vector | AggregateType.FP32) }, { AttributeConsts.InstanceId, new AttributeInfo(AttributeConsts.InstanceId, 0, 1, AggregateType.S32) }, { AttributeConsts.VertexId, new AttributeInfo(AttributeConsts.VertexId, 0, 1, AggregateType.S32) }, + { AttributeConsts.BaseInstance, new AttributeInfo(AttributeConsts.BaseInstance, 0, 1, AggregateType.S32) }, + { AttributeConsts.BaseVertex, new AttributeInfo(AttributeConsts.BaseVertex, 0, 1, AggregateType.S32) }, + { AttributeConsts.InstanceIndex, new AttributeInfo(AttributeConsts.InstanceIndex, 0, 1, AggregateType.S32) }, + { AttributeConsts.VertexIndex, new AttributeInfo(AttributeConsts.VertexIndex, 0, 1, AggregateType.S32) }, { AttributeConsts.FrontFacing, new AttributeInfo(AttributeConsts.FrontFacing, 0, 1, AggregateType.Bool) }, // Special. -- cgit v1.2.3