gpu_synch.h 880 B

1234567891011121314151617181920212223242526272829
  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 PushGPUEntries(Tegra::CommandList&& entries) override;
  16. void SwapBuffers(
  17. std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) override;
  18. void FlushRegion(VAddr addr, u64 size) override;
  19. void InvalidateRegion(VAddr addr, u64 size) override;
  20. void FlushAndInvalidateRegion(VAddr addr, u64 size) override;
  21. };
  22. } // namespace VideoCommon