gpu_synch.h 998 B

123456789101112131415161718192021222324252627282930313233
  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 : 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(
  18. std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) override;
  19. void FlushRegion(CacheAddr addr, u64 size) override;
  20. void InvalidateRegion(CacheAddr addr, u64 size) override;
  21. void FlushAndInvalidateRegion(CacheAddr addr, u64 size) override;
  22. protected:
  23. void TriggerCpuInterrupt(const u32 event_id) const override {}
  24. };
  25. } // namespace VideoCommon