summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2019-01-23 22:09:22 -0500
committerGravatar bunnei2019-03-06 21:48:56 -0500
commit65651078e5ae60ff14bf6d6e8e367ec7262c4120 (patch)
tree11260b97ca9a99a3ed18c53bb38be4d4e42e1075
parentgpu: Refactor command and swap buffers interface for asynch. (diff)
downloadyuzu-65651078e5ae60ff14bf6d6e8e367ec7262c4120.tar.gz
yuzu-65651078e5ae60ff14bf6d6e8e367ec7262c4120.tar.xz
yuzu-65651078e5ae60ff14bf6d6e8e367ec7262c4120.zip
bootmanager: Ensure that we have a context for shader loading.
-rw-r--r--src/yuzu/bootmanager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 73b04b749..3b070bfbb 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -20,10 +20,7 @@
20EmuThread::EmuThread(GRenderWindow* render_window) : render_window(render_window) {} 20EmuThread::EmuThread(GRenderWindow* render_window) : render_window(render_window) {}
21 21
22void EmuThread::run() { 22void EmuThread::run() {
23 if (!Settings::values.use_multi_core) { 23 render_window->MakeCurrent();
24 // Single core mode must acquire OpenGL context for entire emulation session
25 render_window->MakeCurrent();
26 }
27 24
28 MicroProfileOnThreadCreate("EmuThread"); 25 MicroProfileOnThreadCreate("EmuThread");
29 26
@@ -38,6 +35,11 @@ void EmuThread::run() {
38 35
39 emit LoadProgress(VideoCore::LoadCallbackStage::Complete, 0, 0); 36 emit LoadProgress(VideoCore::LoadCallbackStage::Complete, 0, 0);
40 37
38 if (Settings::values.use_asynchronous_gpu_emulation) {
39 // Release OpenGL context for the GPU thread
40 render_window->DoneCurrent();
41 }
42
41 // holds whether the cpu was running during the last iteration, 43 // holds whether the cpu was running during the last iteration,
42 // so that the DebugModeLeft signal can be emitted before the 44 // so that the DebugModeLeft signal can be emitted before the
43 // next execution step 45 // next execution step