control.h 925 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // SPDX-FileCopyrightText: 2021 yuzu emulator team and Skyline Team and Contributors
  2. // (https://github.com/skyline-emu/)
  3. // SPDX-License-Identifier: GPL-3.0-or-later Licensed under GPLv3
  4. // or any later version Refer to the license.txt file included.
  5. #pragma once
  6. #include "common/common_types.h"
  7. namespace Tegra {
  8. namespace Host1x {
  9. class Host1x;
  10. class Nvdec;
  11. class Control {
  12. public:
  13. enum class Method : u32 {
  14. WaitSyncpt = 0x8,
  15. LoadSyncptPayload32 = 0x4e,
  16. WaitSyncpt32 = 0x50,
  17. };
  18. explicit Control(Host1x& host1x);
  19. ~Control();
  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. Host1x& host1x;
  27. };
  28. } // namespace Host1x
  29. } // namespace Tegra