UpdateRenderScaleCommand.cs 911 B

1234567891011121314151617181920212223242526
  1. using Ryujinx.Graphics.GAL.Multithreading.Model;
  2. using Ryujinx.Graphics.Shader;
  3. namespace Ryujinx.Graphics.GAL.Multithreading.Commands
  4. {
  5. struct UpdateRenderScaleCommand : IGALCommand
  6. {
  7. public CommandType CommandType => CommandType.UpdateRenderScale;
  8. private SpanRef<float> _scales;
  9. private int _totalCount;
  10. private int _fragmentCount;
  11. public void Set(SpanRef<float> scales, int totalCount, int fragmentCount)
  12. {
  13. _scales = scales;
  14. _totalCount = totalCount;
  15. _fragmentCount = fragmentCount;
  16. }
  17. public static void Run(ref UpdateRenderScaleCommand command, ThreadedRenderer threaded, IRenderer renderer)
  18. {
  19. renderer.Pipeline.UpdateRenderScale(command._scales.Get(threaded), command._totalCount, command._fragmentCount);
  20. command._scales.Dispose(threaded);
  21. }
  22. }
  23. }