ShaderDisposeCommand.cs 648 B

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