mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-09 07:58:32 +00:00
7fea26e97e
* Introduce new IGALCommand<T> interface and use it * Remove use of reflection on GAL multithreading * Unmanaged constraint
24 lines
853 B
C#
24 lines
853 B
C#
using Ryujinx.Graphics.GAL.Multithreading.Model;
|
|
using System;
|
|
|
|
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
|
{
|
|
struct SetVertexAttribsCommand : IGALCommand, IGALCommand<SetVertexAttribsCommand>
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
}
|