From 1287098b8ba5a95cde2462267d2897a90027fcb2 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Fri, 19 Jul 2024 19:39:58 +0100 Subject: [PATCH] GAL ResourceUsage Changes TODO: Guest Barrier Defer --- src/Ryujinx.Graphics.Metal/HelperShader.cs | 2 +- src/Ryujinx.Graphics.Metal/ResourceLayoutBuilder.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Ryujinx.Graphics.Metal/HelperShader.cs b/src/Ryujinx.Graphics.Metal/HelperShader.cs index 02c44365d3..647e4ba8ba 100644 --- a/src/Ryujinx.Graphics.Metal/HelperShader.cs +++ b/src/Ryujinx.Graphics.Metal/HelperShader.cs @@ -71,7 +71,7 @@ namespace Ryujinx.Graphics.Metal var strideChangeResourceLayout = new ResourceLayoutBuilder() .Add(ResourceStages.Compute, ResourceType.UniformBuffer, 0) .Add(ResourceStages.Compute, ResourceType.StorageBuffer, 1) - .Add(ResourceStages.Compute, ResourceType.StorageBuffer, 2).Build(); + .Add(ResourceStages.Compute, ResourceType.StorageBuffer, 2, true).Build(); var strideChangeSource = ReadMsl("ChangeBufferStride.metal"); _programStrideChange = new Program( diff --git a/src/Ryujinx.Graphics.Metal/ResourceLayoutBuilder.cs b/src/Ryujinx.Graphics.Metal/ResourceLayoutBuilder.cs index 24ba1b6e66..e969ce82bd 100644 --- a/src/Ryujinx.Graphics.Metal/ResourceLayoutBuilder.cs +++ b/src/Ryujinx.Graphics.Metal/ResourceLayoutBuilder.cs @@ -25,7 +25,7 @@ namespace Ryujinx.Graphics.Metal } } - public ResourceLayoutBuilder Add(ResourceStages stages, ResourceType type, int binding) + public ResourceLayoutBuilder Add(ResourceStages stages, ResourceType type, int binding, bool write = false) { int setIndex = type switch { @@ -37,7 +37,7 @@ namespace Ryujinx.Graphics.Metal }; _resourceDescriptors[setIndex].Add(new ResourceDescriptor(binding, 1, type, stages)); - _resourceUsages[setIndex].Add(new ResourceUsage(binding, 1, type, stages)); + _resourceUsages[setIndex].Add(new ResourceUsage(binding, 1, type, stages, write)); return this; }