SetRenderTargetColorMasksCommand.cs 797 B

1234567891011121314151617181920212223
  1. using Ryujinx.Graphics.GAL.Multithreading.Model;
  2. using System;
  3. namespace Ryujinx.Graphics.GAL.Multithreading.Commands
  4. {
  5. struct SetRenderTargetColorMasksCommand : IGALCommand
  6. {
  7. public CommandType CommandType => CommandType.SetRenderTargetColorMasks;
  8. private SpanRef<uint> _componentMask;
  9. public void Set(SpanRef<uint> componentMask)
  10. {
  11. _componentMask = componentMask;
  12. }
  13. public static void Run(ref SetRenderTargetColorMasksCommand command, ThreadedRenderer threaded, IRenderer renderer)
  14. {
  15. ReadOnlySpan<uint> componentMask = command._componentMask.Get(threaded);
  16. renderer.Pipeline.SetRenderTargetColorMasks(componentMask);
  17. command._componentMask.Dispose(threaded);
  18. }
  19. }
  20. }