/ src / Ryujinx.Graphics.GAL / Multithreading / Commands / Buffer / BufferDisposeCommand.cs
BufferDisposeCommand.cs
 1  namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Buffer
 2  {
 3      struct BufferDisposeCommand : IGALCommand, IGALCommand<BufferDisposeCommand>
 4      {
 5          public readonly CommandType CommandType => CommandType.BufferDispose;
 6          private BufferHandle _buffer;
 7  
 8          public void Set(BufferHandle buffer)
 9          {
10              _buffer = buffer;
11          }
12  
13          public static void Run(ref BufferDisposeCommand command, ThreadedRenderer threaded, IRenderer renderer)
14          {
15              renderer.DeleteBuffer(threaded.Buffers.MapBuffer(command._buffer));
16              threaded.Buffers.UnassignBuffer(command._buffer);
17          }
18      }
19  }