/ src / Ryujinx.Graphics.GAL / Multithreading / Commands / SetVertexAttribsCommand.cs
SetVertexAttribsCommand.cs
 1  using Ryujinx.Graphics.GAL.Multithreading.Model;
 2  using System;
 3  
 4  namespace Ryujinx.Graphics.GAL.Multithreading.Commands
 5  {
 6      struct SetVertexAttribsCommand : IGALCommand, IGALCommand<SetVertexAttribsCommand>
 7      {
 8          public readonly CommandType CommandType => CommandType.SetVertexAttribs;
 9          private SpanRef<VertexAttribDescriptor> _vertexAttribs;
10  
11          public void Set(SpanRef<VertexAttribDescriptor> vertexAttribs)
12          {
13              _vertexAttribs = vertexAttribs;
14          }
15  
16          public static void Run(ref SetVertexAttribsCommand command, ThreadedRenderer threaded, IRenderer renderer)
17          {
18              ReadOnlySpan<VertexAttribDescriptor> vertexAttribs = command._vertexAttribs.Get(threaded);
19              renderer.Pipeline.SetVertexAttribs(vertexAttribs);
20              command._vertexAttribs.Dispose(threaded);
21          }
22      }
23  }