ProgramDisposeCommand.cs 659 B

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