summaryrefslogtreecommitdiffstats
path: root/src/video_core/gpu_synch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/gpu_synch.cpp')
-rw-r--r--src/video_core/gpu_synch.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/video_core/gpu_synch.cpp b/src/video_core/gpu_synch.cpp
index d48221077..bd5278a5c 100644
--- a/src/video_core/gpu_synch.cpp
+++ b/src/video_core/gpu_synch.cpp
@@ -7,12 +7,15 @@
namespace VideoCommon {
-GPUSynch::GPUSynch(Core::System& system, VideoCore::RendererBase& renderer)
- : GPU(system, renderer, false) {}
+GPUSynch::GPUSynch(Core::System& system, std::unique_ptr<VideoCore::RendererBase>&& renderer,
+ std::unique_ptr<Core::Frontend::GraphicsContext>&& context)
+ : GPU(system, std::move(renderer), false), context{std::move(context)} {}
GPUSynch::~GPUSynch() = default;
-void GPUSynch::Start() {}
+void GPUSynch::Start() {
+ context->MakeCurrent();
+}
void GPUSynch::PushGPUEntries(Tegra::CommandList&& entries) {
dma_pusher->Push(std::move(entries));
@@ -20,19 +23,19 @@ void GPUSynch::PushGPUEntries(Tegra::CommandList&& entries) {
}
void GPUSynch::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
- renderer.SwapBuffers(framebuffer);
+ renderer->SwapBuffers(framebuffer);
}
void GPUSynch::FlushRegion(CacheAddr addr, u64 size) {
- renderer.Rasterizer().FlushRegion(addr, size);
+ renderer->Rasterizer().FlushRegion(addr, size);
}
void GPUSynch::InvalidateRegion(CacheAddr addr, u64 size) {
- renderer.Rasterizer().InvalidateRegion(addr, size);
+ renderer->Rasterizer().InvalidateRegion(addr, size);
}
void GPUSynch::FlushAndInvalidateRegion(CacheAddr addr, u64 size) {
- renderer.Rasterizer().FlushAndInvalidateRegion(addr, size);
+ renderer->Rasterizer().FlushAndInvalidateRegion(addr, size);
}
} // namespace VideoCommon