diff options
Diffstat (limited to 'src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArrayCommand.cs')
| -rw-r--r-- | src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArrayCommand.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArrayCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArrayCommand.cs new file mode 100644 index 00000000..b8d3c7ac --- /dev/null +++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArrayCommand.cs @@ -0,0 +1,26 @@ +using Ryujinx.Graphics.GAL.Multithreading.Model; +using Ryujinx.Graphics.GAL.Multithreading.Resources; +using Ryujinx.Graphics.Shader; + +namespace Ryujinx.Graphics.GAL.Multithreading.Commands +{ + struct SetImageArrayCommand : IGALCommand, IGALCommand<SetImageArrayCommand> + { + public readonly CommandType CommandType => CommandType.SetImageArray; + private ShaderStage _stage; + private int _binding; + private TableRef<IImageArray> _array; + + public void Set(ShaderStage stage, int binding, TableRef<IImageArray> array) + { + _stage = stage; + _binding = binding; + _array = array; + } + + public static void Run(ref SetImageArrayCommand command, ThreadedRenderer threaded, IRenderer renderer) + { + renderer.Pipeline.SetImageArray(command._stage, command._binding, command._array.GetAs<ThreadedImageArray>(threaded)?.Base); + } + } +} |
