UpdateRenderScaleCommand.cs 1005 B

12345678910111213141516171819202122232425262728
  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 ShaderStage _stage;
  9. private SpanRef<float> _scales;
  10. private int _textureCount;
  11. private int _imageCount;
  12. public void Set(ShaderStage stage, SpanRef<float> scales, int textureCount, int imageCount)
  13. {
  14. _stage = stage;
  15. _scales = scales;
  16. _textureCount = textureCount;
  17. _imageCount = imageCount;
  18. }
  19. public static void Run(ref UpdateRenderScaleCommand command, ThreadedRenderer threaded, IRenderer renderer)
  20. {
  21. renderer.Pipeline.UpdateRenderScale(command._stage, command._scales.Get(threaded), command._textureCount, command._imageCount);
  22. command._scales.Dispose(threaded);
  23. }
  24. }
  25. }