host1x.h 790 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2020 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <vector>
  6. #include "common/common_funcs.h"
  7. #include "common/common_types.h"
  8. namespace Tegra {
  9. class GPU;
  10. class Nvdec;
  11. class Host1x {
  12. public:
  13. enum class Method : u32 {
  14. WaitSyncpt = 0x8,
  15. LoadSyncptPayload32 = 0x4e,
  16. WaitSyncpt32 = 0x50,
  17. };
  18. explicit Host1x(GPU& gpu);
  19. ~Host1x();
  20. /// Writes the method into the state, Invoke Execute() if encountered
  21. void ProcessMethod(Method method, u32 argument);
  22. private:
  23. /// For Host1x, execute is waiting on a syncpoint previously written into the state
  24. void Execute(u32 data);
  25. u32 syncpoint_value{};
  26. GPU& gpu;
  27. };
  28. } // namespace Tegra