aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL/Multithreading/Commands/DrawIndirectCommand.cs
blob: 73414e44152bb186a5ad2a016dc27e960fae4b50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
namespace Ryujinx.Graphics.GAL.Multithreading.Commands
{
    struct DrawIndirectCommand : IGALCommand
    {
        public CommandType CommandType => CommandType.DrawIndirect;
        private BufferRange _indirectBuffer;

        public void Set(BufferRange indirectBuffer)
        {
            _indirectBuffer = indirectBuffer;
        }

        public static void Run(ref DrawIndirectCommand command, ThreadedRenderer threaded, IRenderer renderer)
        {
            renderer.Pipeline.DrawIndirect(threaded.Buffers.MapBufferRange(command._indirectBuffer));
        }
    }
}