ClearRenderTargetColorCommand.cs 936 B

1234567891011121314151617181920212223242526
  1. namespace Ryujinx.Graphics.GAL.Multithreading.Commands
  2. {
  3. struct ClearRenderTargetColorCommand : IGALCommand
  4. {
  5. public CommandType CommandType => CommandType.ClearRenderTargetColor;
  6. private int _index;
  7. private int _layer;
  8. private int _layerCount;
  9. private uint _componentMask;
  10. private ColorF _color;
  11. public void Set(int index, int layer, int layerCount, uint componentMask, ColorF color)
  12. {
  13. _index = index;
  14. _layer = layer;
  15. _layerCount = layerCount;
  16. _componentMask = componentMask;
  17. _color = color;
  18. }
  19. public static void Run(ref ClearRenderTargetColorCommand command, ThreadedRenderer threaded, IRenderer renderer)
  20. {
  21. renderer.Pipeline.ClearRenderTargetColor(command._index, command._layer, command._layerCount, command._componentMask, command._color);
  22. }
  23. }
  24. }