summaryrefslogtreecommitdiffstats
path: root/src/video_core/gpu_asynch.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-04-03 17:58:43 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:36:08 +0200
commitad92865497f83fe4c19cd9ab78cce9da1a8c3a6c (patch)
treef24dd8b60b23abe73931a934af33d2ed82aa7975 /src/video_core/gpu_asynch.cpp
parentCoreTiming/CycleTimer: Correct Idling. (diff)
downloadyuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.tar
yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.tar.gz
yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.tar.bz2
yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.tar.lz
yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.tar.xz
yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.tar.zst
yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.zip
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 53305ab43..7b855f63e 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));
}