diff options
| author | 2022-12-15 12:05:01 -0500 | |
|---|---|---|
| committer | 2022-12-15 12:05:01 -0500 | |
| commit | 3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6 (patch) | |
| tree | 0d014da28cf6a8a1045cd2a7d7df8301522ea47c /src/video_core/gpu.cpp | |
| parent | Merge pull request #9441 from yuzu-emu/revert-9232-audio-default-thread (diff) | |
| parent | gl_device: Use a more robust way to use strict context mode (diff) | |
| download | yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.gz yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.tar.xz yuzu-3ff7a5de1a54c9f478b23de1a0bd6c6188ea80a6.zip | |
Merge pull request #7410 from Nefsen402/wayland-fixes
Wayland fixes
Diffstat (limited to 'src/video_core/gpu.cpp')
| -rw-r--r-- | src/video_core/gpu.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 28b38273e..c6d54be63 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -223,8 +223,6 @@ struct GPU::Impl { | |||
| 223 | /// core timing events. | 223 | /// core timing events. |
| 224 | void Start() { | 224 | void Start() { |
| 225 | gpu_thread.StartThread(*renderer, renderer->Context(), *scheduler); | 225 | gpu_thread.StartThread(*renderer, renderer->Context(), *scheduler); |
| 226 | cpu_context = renderer->GetRenderWindow().CreateSharedContext(); | ||
| 227 | cpu_context->MakeCurrent(); | ||
| 228 | } | 226 | } |
| 229 | 227 | ||
| 230 | void NotifyShutdown() { | 228 | void NotifyShutdown() { |
| @@ -235,6 +233,9 @@ struct GPU::Impl { | |||
| 235 | 233 | ||
| 236 | /// Obtain the CPU Context | 234 | /// Obtain the CPU Context |
| 237 | void ObtainContext() { | 235 | void ObtainContext() { |
| 236 | if (!cpu_context) { | ||
| 237 | cpu_context = renderer->GetRenderWindow().CreateSharedContext(); | ||
| 238 | } | ||
| 238 | cpu_context->MakeCurrent(); | 239 | cpu_context->MakeCurrent(); |
| 239 | } | 240 | } |
| 240 | 241 | ||