UpdateRenderScaleCommand.cs 880 B

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