host1x.cpp 794 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2020 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #include "common/assert.h"
  5. #include "video_core/command_classes/host1x.h"
  6. #include "video_core/gpu.h"
  7. Tegra::Host1x::Host1x(GPU& gpu_) : gpu(gpu_) {}
  8. Tegra::Host1x::~Host1x() = default;
  9. void Tegra::Host1x::ProcessMethod(Method method, u32 argument) {
  10. switch (method) {
  11. case Method::LoadSyncptPayload32:
  12. syncpoint_value = argument;
  13. break;
  14. case Method::WaitSyncpt:
  15. case Method::WaitSyncpt32:
  16. Execute(argument);
  17. break;
  18. default:
  19. UNIMPLEMENTED_MSG("Host1x method 0x{:X}", static_cast<u32>(method));
  20. break;
  21. }
  22. }
  23. void Tegra::Host1x::Execute(u32 data) {
  24. gpu.WaitFence(data, syncpoint_value);
  25. }