From e3468d35b64aad64813e2b8bef15ea05ec03103c Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Thu, 4 Jul 2024 19:34:14 +0100 Subject: [PATCH] Fix invariant position not doing its job --- src/Ryujinx.Graphics.Metal/Program.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.Metal/Program.cs b/src/Ryujinx.Graphics.Metal/Program.cs index 8f289392ff..290bf7b9ed 100644 --- a/src/Ryujinx.Graphics.Metal/Program.cs +++ b/src/Ryujinx.Graphics.Metal/Program.cs @@ -38,8 +38,10 @@ namespace Ryujinx.Graphics.Metal { ShaderSource shader = shaders[index]; + var compileOptions = new MTLCompileOptions { PreserveInvariance = true }; + var libraryError = new NSError(IntPtr.Zero); - var shaderLibrary = device.NewLibrary(StringHelper.NSString(shader.Code), new MTLCompileOptions(IntPtr.Zero), ref libraryError); + var shaderLibrary = device.NewLibrary(StringHelper.NSString(shader.Code), compileOptions, ref libraryError); if (libraryError != IntPtr.Zero) { Logger.Warning?.PrintMsg(LogClass.Gpu, shader.Code);