aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/gpu_asynch.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-04-03 11:58:43 -0400
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 11:36:08 -0400
commitad92865497f83fe4c19cd9ab78cce9da1a8c3a6c (patch)
treef24dd8b60b23abe73931a934af33d2ed82aa7975 /src/video_core/gpu_asynch.cpp
parentbfb5244cf8c600e6444d8590c8850ec31779bc6c (diff)
General: Correct rebase, sync gpu and context management.
Diffstat (limited to 'src/video_core/gpu_asynch.cpp')
-rw-r--r--src/video_core/gpu_asynch.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/video_core/gpu_asynch.cpp b/src/video_core/gpu_asynch.cpp
index 53305ab436..7b855f63e6 100644
--- a/src/video_core/gpu_asynch.cpp
+++ b/src/video_core/gpu_asynch.cpp
@@ -19,10 +19,17 @@ GPUAsynch::GPUAsynch(Core::System& system, std::unique_ptr<VideoCore::RendererBa
GPUAsynch::~GPUAsynch() = default;
void GPUAsynch::Start() {
- cpu_context->MakeCurrent();
gpu_thread.StartThread(*renderer, *gpu_context, *dma_pusher);
}
+void GPUAsynch::ObtainContext() {
+ cpu_context->MakeCurrent();
+}
+
+void GPUAsynch::ReleaseContext() {
+ cpu_context->DoneCurrent();
+}
+
void GPUAsynch::PushGPUEntries(Tegra::CommandList&& entries) {
gpu_thread.SubmitList(std::move(entries));
}