TryHostConditionalRenderingFlushCommand.cs 1005 B

12345678910111213141516171819202122232425
  1. using Ryujinx.Graphics.GAL.Multithreading.Model;
  2. using Ryujinx.Graphics.GAL.Multithreading.Resources;
  3. namespace Ryujinx.Graphics.GAL.Multithreading.Commands
  4. {
  5. struct TryHostConditionalRenderingFlushCommand : IGALCommand
  6. {
  7. public CommandType CommandType => CommandType.TryHostConditionalRenderingFlush;
  8. private TableRef<ThreadedCounterEvent> _value;
  9. private TableRef<ThreadedCounterEvent> _compare;
  10. private bool _isEqual;
  11. public void Set(TableRef<ThreadedCounterEvent> value, TableRef<ThreadedCounterEvent> compare, bool isEqual)
  12. {
  13. _value = value;
  14. _compare = compare;
  15. _isEqual = isEqual;
  16. }
  17. public static void Run(ref TryHostConditionalRenderingFlushCommand command, ThreadedRenderer threaded, IRenderer renderer)
  18. {
  19. renderer.Pipeline.TryHostConditionalRendering(command._value.Get(threaded)?.Base, command._compare.Get(threaded)?.Base, command._isEqual);
  20. }
  21. }
  22. }