SamplerDisposeCommand.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.Sampler
  4. {
  5. struct SamplerDisposeCommand : IGALCommand
  6. {
  7. public CommandType CommandType => CommandType.SamplerDispose;
  8. private TableRef<ThreadedSampler> _sampler;
  9. public void Set(TableRef<ThreadedSampler> sampler)
  10. {
  11. _sampler = sampler;
  12. }
  13. public static void Run(ref SamplerDisposeCommand command, ThreadedRenderer threaded, IRenderer renderer)
  14. {
  15. command._sampler.Get(threaded).Base.Dispose();
  16. }
  17. }
  18. }