diff options
Diffstat (limited to 'src/Ryujinx.Graphics.GAL/Multithreading')
-rw-r--r-- | src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageCommand.cs | 7 | ||||
-rw-r--r-- | src/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageCommand.cs index b4e966ca..243480a8 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageCommand.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageCommand.cs @@ -1,17 +1,20 @@ using Ryujinx.Graphics.GAL.Multithreading.Model; using Ryujinx.Graphics.GAL.Multithreading.Resources; +using Ryujinx.Graphics.Shader; namespace Ryujinx.Graphics.GAL.Multithreading.Commands { struct SetImageCommand : IGALCommand, IGALCommand<SetImageCommand> { public readonly CommandType CommandType => CommandType.SetImage; + private ShaderStage _stage; private int _binding; private TableRef<ITexture> _texture; private Format _imageFormat; - public void Set(int binding, TableRef<ITexture> texture, Format imageFormat) + public void Set(ShaderStage stage, int binding, TableRef<ITexture> texture, Format imageFormat) { + _stage = stage; _binding = binding; _texture = texture; _imageFormat = imageFormat; @@ -19,7 +22,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands public static void Run(ref SetImageCommand command, ThreadedRenderer threaded, IRenderer renderer) { - renderer.Pipeline.SetImage(command._binding, command._texture.GetAs<ThreadedTexture>(threaded)?.Base, command._imageFormat); + renderer.Pipeline.SetImage(command._stage, command._binding, command._texture.GetAs<ThreadedTexture>(threaded)?.Base, command._imageFormat); } } } diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs b/src/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs index f40d9896..ad50bddf 100644 --- a/src/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs +++ b/src/Ryujinx.Graphics.GAL/Multithreading/ThreadedPipeline.cs @@ -177,9 +177,9 @@ namespace Ryujinx.Graphics.GAL.Multithreading _renderer.QueueCommand(); } - public void SetImage(int binding, ITexture texture, Format imageFormat) + public void SetImage(ShaderStage stage, int binding, ITexture texture, Format imageFormat) { - _renderer.New<SetImageCommand>().Set(binding, Ref(texture), imageFormat); + _renderer.New<SetImageCommand>().Set(stage, binding, Ref(texture), imageFormat); _renderer.QueueCommand(); } |