aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArraySeparateCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArraySeparateCommand.cs')
-rw-r--r--src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArraySeparateCommand.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArraySeparateCommand.cs b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArraySeparateCommand.cs
new file mode 100644
index 00000000..abeb58a0
--- /dev/null
+++ b/src/Ryujinx.Graphics.GAL/Multithreading/Commands/SetImageArraySeparateCommand.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 SetImageArraySeparateCommand : IGALCommand, IGALCommand<SetImageArraySeparateCommand>
+ {
+ public readonly CommandType CommandType => CommandType.SetImageArraySeparate;
+ private ShaderStage _stage;
+ private int _setIndex;
+ private TableRef<IImageArray> _array;
+
+ public void Set(ShaderStage stage, int setIndex, TableRef<IImageArray> array)
+ {
+ _stage = stage;
+ _setIndex = setIndex;
+ _array = array;
+ }
+
+ public static void Run(ref SetImageArraySeparateCommand command, ThreadedRenderer threaded, IRenderer renderer)
+ {
+ renderer.Pipeline.SetImageArraySeparate(command._stage, command._setIndex, command._array.GetAs<ThreadedImageArray>(threaded)?.Base);
+ }
+ }
+}