mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-01 19:27:18 +01:00
7fea26e97e
* Introduce new IGALCommand<T> interface and use it * Remove use of reflection on GAL multithreading * Unmanaged constraint
25 lines
874 B
C#
25 lines
874 B
C#
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
|
|
{
|
|
struct DrawCommand : IGALCommand, IGALCommand<DrawCommand>
|
|
{
|
|
public CommandType CommandType => CommandType.Draw;
|
|
private int _vertexCount;
|
|
private int _instanceCount;
|
|
private int _firstVertex;
|
|
private int _firstInstance;
|
|
|
|
public void Set(int vertexCount, int instanceCount, int firstVertex, int firstInstance)
|
|
{
|
|
_vertexCount = vertexCount;
|
|
_instanceCount = instanceCount;
|
|
_firstVertex = firstVertex;
|
|
_firstInstance = firstInstance;
|
|
}
|
|
|
|
public static void Run(ref DrawCommand command, ThreadedRenderer threaded, IRenderer renderer)
|
|
{
|
|
renderer.Pipeline.Draw(command._vertexCount, command._instanceCount, command._firstVertex, command._firstInstance);
|
|
}
|
|
}
|
|
}
|