From ab79959975ee7458a6de8c4f29a7102816f0ff6d Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Tue, 2 Jul 2024 12:00:37 +0100 Subject: [PATCH] Dirty Arg Buffers on Program Change --- src/Ryujinx.Graphics.Metal/EncoderState.cs | 6 ++++-- src/Ryujinx.Graphics.Metal/EncoderStateManager.cs | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Ryujinx.Graphics.Metal/EncoderState.cs b/src/Ryujinx.Graphics.Metal/EncoderState.cs index 375d9d17a..bd60e90e4 100644 --- a/src/Ryujinx.Graphics.Metal/EncoderState.cs +++ b/src/Ryujinx.Graphics.Metal/EncoderState.cs @@ -27,8 +27,10 @@ namespace Ryujinx.Graphics.Metal Textures = 1 << 12, Images = 1 << 13, - RenderAll = RenderPipeline | DepthStencil | DepthClamp | DepthBias | CullMode | FrontFace | StencilRef | Viewports | Scissors | Uniforms | Storages | Textures | Images, - ComputeAll = ComputePipeline | Uniforms | Storages | Textures | Images, + ArgBuffers = Uniforms | Storages | Textures | Images, + + RenderAll = RenderPipeline | DepthStencil | DepthClamp | DepthBias | CullMode | FrontFace | StencilRef | Viewports | Scissors | ArgBuffers, + ComputeAll = ComputePipeline | ArgBuffers, All = RenderAll | ComputeAll, } diff --git a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs index e24b091e7..343fcd441 100644 --- a/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs +++ b/src/Ryujinx.Graphics.Metal/EncoderStateManager.cs @@ -346,13 +346,13 @@ namespace Ryujinx.Graphics.Metal { _currentState.RenderProgram = prg; - _currentState.Dirty |= DirtyFlags.RenderPipeline; + _currentState.Dirty |= DirtyFlags.RenderPipeline | DirtyFlags.ArgBuffers; } else if (prg.ComputeFunction != IntPtr.Zero) { _currentState.ComputeProgram = prg; - _currentState.Dirty |= DirtyFlags.ComputePipeline; + _currentState.Dirty |= DirtyFlags.ComputePipeline | DirtyFlags.ArgBuffers; } }