diff options
| author | 2020-04-02 01:38:25 -0300 | |
|---|---|---|
| committer | 2020-04-02 01:38:25 -0300 | |
| commit | 825a6e2615f86742b2e5182af1329da4a2bae413 (patch) | |
| tree | 0b5d26f82b65067f0562b14a65b0d34aba688e01 /src/yuzu_cmd/yuzu.cpp | |
| parent | Merge pull request #3591 from ReinUsesLisp/vk-wrapper-part2 (diff) | |
| parent | Frontend: Don't call DoneCurrent if the context isnt already current (diff) | |
| download | yuzu-825a6e2615f86742b2e5182af1329da4a2bae413.tar.gz yuzu-825a6e2615f86742b2e5182af1329da4a2bae413.tar.xz yuzu-825a6e2615f86742b2e5182af1329da4a2bae413.zip | |
Merge pull request #3552 from jroweboy/single-context
Refactor Context management (Fixes renderdoc on opengl issues)
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index babf4c3a4..4d2ea7e9e 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -230,17 +230,10 @@ int main(int argc, char** argv) { | |||
| 230 | 230 | ||
| 231 | system.TelemetrySession().AddField(Telemetry::FieldType::App, "Frontend", "SDL"); | 231 | system.TelemetrySession().AddField(Telemetry::FieldType::App, "Frontend", "SDL"); |
| 232 | 232 | ||
| 233 | system.Renderer().Rasterizer().LoadDiskResources(); | 233 | // Core is loaded, start the GPU (makes the GPU contexts current to this thread) |
| 234 | system.GPU().Start(); | ||
| 234 | 235 | ||
| 235 | // Acquire render context for duration of the thread if this is the rendering thread | 236 | system.Renderer().Rasterizer().LoadDiskResources(); |
| 236 | if (!Settings::values.use_asynchronous_gpu_emulation) { | ||
| 237 | emu_window->MakeCurrent(); | ||
| 238 | } | ||
| 239 | SCOPE_EXIT({ | ||
| 240 | if (!Settings::values.use_asynchronous_gpu_emulation) { | ||
| 241 | emu_window->DoneCurrent(); | ||
| 242 | } | ||
| 243 | }); | ||
| 244 | 237 | ||
| 245 | std::thread render_thread([&emu_window] { emu_window->Present(); }); | 238 | std::thread render_thread([&emu_window] { emu_window->Present(); }); |
| 246 | while (emu_window->IsOpen()) { | 239 | while (emu_window->IsOpen()) { |