gpu_synch.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2019 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "video_core/gpu.h"
  6. namespace VideoCore {
  7. class RendererBase;
  8. } // namespace VideoCore
  9. namespace VideoCommon {
  10. /// Implementation of GPU interface that runs the GPU synchronously
  11. class GPUSynch final : public Tegra::GPU {
  12. public:
  13. explicit GPUSynch(Core::System& system, VideoCore::RendererBase& renderer);
  14. ~GPUSynch() override;
  15. void Start() override;
  16. void PushGPUEntries(Tegra::CommandList&& entries) override;
  17. void SwapBuffers(const Tegra::FramebufferConfig* framebuffer) override;
  18. void FlushRegion(CacheAddr addr, u64 size) override;
  19. void InvalidateRegion(CacheAddr addr, u64 size) override;
  20. void FlushAndInvalidateRegion(CacheAddr addr, u64 size) override;
  21. void WaitIdle() const override {}
  22. protected:
  23. void TriggerCpuInterrupt([[maybe_unused]] u32 syncpoint_id,
  24. [[maybe_unused]] u32 value) const override {}
  25. };
  26. } // namespace VideoCommon