CreateSamplerCommand.cs 778 B

1234567891011121314151617181920212223
  1. using Ryujinx.Graphics.GAL.Multithreading.Model;
  2. using Ryujinx.Graphics.GAL.Multithreading.Resources;
  3. namespace Ryujinx.Graphics.GAL.Multithreading.Commands.Renderer
  4. {
  5. struct CreateSamplerCommand : IGALCommand
  6. {
  7. public CommandType CommandType => CommandType.CreateSampler;
  8. private TableRef<ThreadedSampler> _sampler;
  9. private SamplerCreateInfo _info;
  10. public void Set(TableRef<ThreadedSampler> sampler, SamplerCreateInfo info)
  11. {
  12. _sampler = sampler;
  13. _info = info;
  14. }
  15. public static void Run(ref CreateSamplerCommand command, ThreadedRenderer threaded, IRenderer renderer)
  16. {
  17. command._sampler.Get(threaded).Base = renderer.CreateSampler(command._info);
  18. }
  19. }
  20. }