/ src / Ryujinx.Graphics.GAL / Multithreading / Commands / ClearBufferCommand.cs
ClearBufferCommand.cs
 1  namespace Ryujinx.Graphics.GAL.Multithreading.Commands
 2  {
 3      struct ClearBufferCommand : IGALCommand, IGALCommand<ClearBufferCommand>
 4      {
 5          public readonly CommandType CommandType => CommandType.ClearBuffer;
 6          private BufferHandle _destination;
 7          private int _offset;
 8          private int _size;
 9          private uint _value;
10  
11          public void Set(BufferHandle destination, int offset, int size, uint value)
12          {
13              _destination = destination;
14              _offset = offset;
15              _size = size;
16              _value = value;
17          }
18  
19          public static void Run(ref ClearBufferCommand command, ThreadedRenderer threaded, IRenderer renderer)
20          {
21              renderer.Pipeline.ClearBuffer(threaded.Buffers.MapBuffer(command._destination), command._offset, command._size, command._value);
22          }
23      }
24  }