aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/Multithreading/Commands/SetVertexAttribsCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.GAL/Multithreading/Commands/SetVertexAttribsCommand.cs')
-rw-r--r--Ryujinx.Graphics.GAL/Multithreading/Commands/SetVertexAttribsCommand.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Commands/SetVertexAttribsCommand.cs b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetVertexAttribsCommand.cs
new file mode 100644
index 00000000..cbc313e9
--- /dev/null
+++ b/Ryujinx.Graphics.GAL/Multithreading/Commands/SetVertexAttribsCommand.cs
@@ -0,0 +1,23 @@
+using Ryujinx.Graphics.GAL.Multithreading.Model;
+using System;
+
+namespace Ryujinx.Graphics.GAL.Multithreading.Commands
+{
+ struct SetVertexAttribsCommand : IGALCommand
+ {
+ public CommandType CommandType => CommandType.SetVertexAttribs;
+ private SpanRef<VertexAttribDescriptor> _vertexAttribs;
+
+ public void Set(SpanRef<VertexAttribDescriptor> vertexAttribs)
+ {
+ _vertexAttribs = vertexAttribs;
+ }
+
+ public static void Run(ref SetVertexAttribsCommand command, ThreadedRenderer threaded, IRenderer renderer)
+ {
+ ReadOnlySpan<VertexAttribDescriptor> vertexAttribs = command._vertexAttribs.Get(threaded);
+ renderer.Pipeline.SetVertexAttribs(vertexAttribs);
+ command._vertexAttribs.Dispose(threaded);
+ }
+ }
+}