aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/Multithreading/Commands/UpdateRenderScaleCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.GAL/Multithreading/Commands/UpdateRenderScaleCommand.cs')
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/UpdateRenderScaleCommand.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/UpdateRenderScaleCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/UpdateRenderScaleCommand.cs
new file mode 100644
index 00000000..fafb52a8
--- /dev/null
+++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/UpdateRenderScaleCommand.cs
@@ -0,0 +1,28 @@
+using Ryujinx.Graphics.GAL.Multithreading.Model;
+using Ryujinx.Graphics.Shader;
+
+namespace Ryujinx.Graphics.GAL.Multithreading.Commands
+{
+ struct UpdateRenderScaleCommand : IGALCommand
+ {
+ public CommandType CommandType => CommandType.UpdateRenderScale;
+ private ShaderStage _stage;
+ private SpanRef<float> _scales;
+ private int _textureCount;
+ private int _imageCount;
+
+ public void Set(ShaderStage stage, SpanRef<float> scales, int textureCount, int imageCount)
+ {
+ _stage = stage;
+ _scales = scales;
+ _textureCount = textureCount;
+ _imageCount = imageCount;
+ }
+
+ public static void Run(ref UpdateRenderScaleCommand command, ThreadedRenderer threaded, IRenderer renderer)
+ {
+ renderer.Pipeline.UpdateRenderScale(command._stage, command._scales.Get(threaded), command._textureCount, command._imageCount);
+ command._scales.Dispose(threaded);
+ }
+ }
+}