CounterEventDisposeCommand.cs 716 B

123456789101112131415161718192021
  1. using Ryujinx.Graphics.GAL.Multithreading.Model;
  2. using Ryujinx.Graphics.GAL.Multithreading.Resources;
  3. namespace Ryujinx.Graphics.GAL.Multithreading.Commands.CounterEvent
  4. {
  5. struct CounterEventDisposeCommand : IGALCommand, IGALCommand<CounterEventDisposeCommand>
  6. {
  7. public CommandType CommandType => CommandType.CounterEventDispose;
  8. private TableRef<ThreadedCounterEvent> _event;
  9. public void Set(TableRef<ThreadedCounterEvent> evt)
  10. {
  11. _event = evt;
  12. }
  13. public static void Run(ref CounterEventDisposeCommand command, ThreadedRenderer threaded, IRenderer renderer)
  14. {
  15. command._event.Get(threaded).Base.Dispose();
  16. }
  17. }
  18. }