ClearBufferCommand.cs 814 B

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