From 9a0330f7f8d6c45de3b88afbe3e86e5fa3878e8e Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 8 Dec 2022 06:55:03 -0300 Subject: [PATCH] Shader: Implement PrimitiveID (#4067) * Shader: Implement PrimitiveID * Shader cache version bump --- Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs | 2 +- Ryujinx.Graphics.Shader/Translation/AttributeConsts.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs b/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs index e0ad30fe0d..88a29dc450 100644 --- a/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs +++ b/Ryujinx.Graphics.Gpu/Shader/DiskCache/DiskCacheHostStorage.cs @@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache private const ushort FileFormatVersionMajor = 1; private const ushort FileFormatVersionMinor = 2; private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor; - private const uint CodeGenVersion = 4028; + private const uint CodeGenVersion = 4067; private const string SharedTocFileName = "shared.toc"; private const string SharedDataFileName = "shared.data"; diff --git a/Ryujinx.Graphics.Shader/Translation/AttributeConsts.cs b/Ryujinx.Graphics.Shader/Translation/AttributeConsts.cs index 863e19a0d2..08efbc9fda 100644 --- a/Ryujinx.Graphics.Shader/Translation/AttributeConsts.cs +++ b/Ryujinx.Graphics.Shader/Translation/AttributeConsts.cs @@ -8,6 +8,7 @@ namespace Ryujinx.Graphics.Shader.Translation public const int TessLevelOuter3 = 0x00c; public const int TessLevelInner0 = 0x010; public const int TessLevelInner1 = 0x014; + public const int PrimitiveId = 0x060; public const int Layer = 0x064; public const int ViewportIndex = 0x068; public const int PointSize = 0x06c; @@ -85,8 +86,7 @@ namespace Ryujinx.Graphics.Shader.Translation public const int LaneId = 0x2000020; public const int InvocationId = 0x2000024; - public const int PrimitiveId = 0x2000028; - public const int PatchVerticesIn = 0x200002c; + public const int PatchVerticesIn = 0x2000028; public const int EqMask = 0x2000030; public const int GeMask = 0x2000034;