From 16eb005e8b45e62aa84d8a46014c38cc167ece4c Mon Sep 17 00:00:00 2001
From: Isaac Marovitz <isaacryu@icloud.com>
Date: Thu, 5 Sep 2024 14:08:38 +0200
Subject: [PATCH] Fix typo in stride change shader

Fixes Castlevania Dominus Collection
---
 src/Ryujinx.Graphics.Metal/Shaders/ChangeBufferStride.metal  | 2 +-
 src/Ryujinx.Graphics.Metal/Shaders/ConvertD32S8ToD24S8.metal | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Ryujinx.Graphics.Metal/Shaders/ChangeBufferStride.metal b/src/Ryujinx.Graphics.Metal/Shaders/ChangeBufferStride.metal
index 4424ac531..1a7d2c574 100644
--- a/src/Ryujinx.Graphics.Metal/Shaders/ChangeBufferStride.metal
+++ b/src/Ryujinx.Graphics.Metal/Shaders/ChangeBufferStride.metal
@@ -27,7 +27,7 @@ kernel void kernelMain(constant ConstantBuffers &constant_buffers [[buffer(CONST
                        device StorageBuffers &storage_buffers [[buffer(STORAGE_BUFFERS_INDEX)]],
                        uint3 thread_position_in_grid [[thread_position_in_grid]],
                        uint3 threads_per_threadgroup [[threads_per_threadgroup]],
-                       uint3 threadgroups_per_grid [[threads_per_grid]])
+                       uint3 threadgroups_per_grid [[threadgroups_per_grid]])
 {
     // Determine what slice of the stride copies this invocation will perform.
 
diff --git a/src/Ryujinx.Graphics.Metal/Shaders/ConvertD32S8ToD24S8.metal b/src/Ryujinx.Graphics.Metal/Shaders/ConvertD32S8ToD24S8.metal
index 789527cbb..870ac3d78 100644
--- a/src/Ryujinx.Graphics.Metal/Shaders/ConvertD32S8ToD24S8.metal
+++ b/src/Ryujinx.Graphics.Metal/Shaders/ConvertD32S8ToD24S8.metal
@@ -28,7 +28,7 @@ kernel void kernelMain(constant ConstantBuffers &constant_buffers [[buffer(CONST
                        device StorageBuffers &storage_buffers [[buffer(STORAGE_BUFFERS_INDEX)]],
                        uint3 thread_position_in_grid [[thread_position_in_grid]],
                        uint3 threads_per_threadgroup [[threads_per_threadgroup]],
-                       uint3 threadgroups_per_grid [[threads_per_grid]])
+                       uint3 threadgroups_per_grid [[threadgroups_per_grid]])
 {
     // Determine what slice of the stride copies this invocation will perform.
     int invocations = int(threads_per_threadgroup.x * threadgroups_per_grid.x);