ClearRenderTargetDepthStencilCommand.cs 1.1 KB

12345678910111213141516171819202122232425262728
  1. namespace Ryujinx.Graphics.GAL.Multithreading.Commands
  2. {
  3. struct ClearRenderTargetDepthStencilCommand : IGALCommand
  4. {
  5. public CommandType CommandType => CommandType.ClearRenderTargetDepthStencil;
  6. private int _layer;
  7. private int _layerCount;
  8. private float _depthValue;
  9. private bool _depthMask;
  10. private int _stencilValue;
  11. private int _stencilMask;
  12. public void Set(int layer, int layerCount, float depthValue, bool depthMask, int stencilValue, int stencilMask)
  13. {
  14. _layer = layer;
  15. _layerCount = layerCount;
  16. _depthValue = depthValue;
  17. _depthMask = depthMask;
  18. _stencilValue = stencilValue;
  19. _stencilMask = stencilMask;
  20. }
  21. public static void Run(ref ClearRenderTargetDepthStencilCommand command, ThreadedRenderer threaded, IRenderer renderer)
  22. {
  23. renderer.Pipeline.ClearRenderTargetDepthStencil(command._layer, command._layerCount, command._depthValue, command._depthMask, command._stencilValue, command._stencilMask);
  24. }
  25. }
  26. }