diff options
| author | 2020-04-03 11:58:43 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:36:08 -0400 | |
| commit | ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c (patch) | |
| tree | f24dd8b60b23abe73931a934af33d2ed82aa7975 /src/core/cpu_manager.cpp | |
| parent | CoreTiming/CycleTimer: Correct Idling. (diff) | |
| download | yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.tar.gz yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.tar.xz yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.zip | |
General: Correct rebase, sync gpu and context management.
Diffstat (limited to 'src/core/cpu_manager.cpp')
| -rw-r--r-- | src/core/cpu_manager.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index b7c2a7832..63c578852 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp | |||
| @@ -9,12 +9,12 @@ | |||
| 9 | #include "core/core.h" | 9 | #include "core/core.h" |
| 10 | #include "core/core_timing.h" | 10 | #include "core/core_timing.h" |
| 11 | #include "core/cpu_manager.h" | 11 | #include "core/cpu_manager.h" |
| 12 | #include "core/frontend/emu_window.h" | ||
| 13 | #include "core/gdbstub/gdbstub.h" | 12 | #include "core/gdbstub/gdbstub.h" |
| 14 | #include "core/hle/kernel/kernel.h" | 13 | #include "core/hle/kernel/kernel.h" |
| 15 | #include "core/hle/kernel/physical_core.h" | 14 | #include "core/hle/kernel/physical_core.h" |
| 16 | #include "core/hle/kernel/scheduler.h" | 15 | #include "core/hle/kernel/scheduler.h" |
| 17 | #include "core/hle/kernel/thread.h" | 16 | #include "core/hle/kernel/thread.h" |
| 17 | #include "video_core/gpu.h" | ||
| 18 | 18 | ||
| 19 | namespace Core { | 19 | namespace Core { |
| 20 | 20 | ||
| @@ -25,10 +25,6 @@ void CpuManager::ThreadStart(CpuManager& cpu_manager, std::size_t core) { | |||
| 25 | cpu_manager.RunThread(core); | 25 | cpu_manager.RunThread(core); |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | void CpuManager::SetRenderWindow(Core::Frontend::EmuWindow& render_window) { | ||
| 29 | this->render_window = &render_window; | ||
| 30 | } | ||
| 31 | |||
| 32 | void CpuManager::Initialize() { | 28 | void CpuManager::Initialize() { |
| 33 | running_mode = true; | 29 | running_mode = true; |
| 34 | if (is_multicore) { | 30 | if (is_multicore) { |
| @@ -354,7 +350,7 @@ void CpuManager::RunThread(std::size_t core) { | |||
| 354 | data.is_running = false; | 350 | data.is_running = false; |
| 355 | data.enter_barrier->Wait(); | 351 | data.enter_barrier->Wait(); |
| 356 | if (sc_sync_first_use) { | 352 | if (sc_sync_first_use) { |
| 357 | render_window->MakeCurrent(); | 353 | system.GPU().ObtainContext(); |
| 358 | sc_sync_first_use = false; | 354 | sc_sync_first_use = false; |
| 359 | } | 355 | } |
| 360 | auto& scheduler = system.Kernel().CurrentScheduler(); | 356 | auto& scheduler = system.Kernel().CurrentScheduler(); |
| @@ -366,9 +362,6 @@ void CpuManager::RunThread(std::size_t core) { | |||
| 366 | data.exit_barrier->Wait(); | 362 | data.exit_barrier->Wait(); |
| 367 | data.is_paused = false; | 363 | data.is_paused = false; |
| 368 | } | 364 | } |
| 369 | if (sc_sync) { | ||
| 370 | render_window->DoneCurrent(); | ||
| 371 | } | ||
| 372 | /// Time to cleanup | 365 | /// Time to cleanup |
| 373 | data.host_context->Exit(); | 366 | data.host_context->Exit(); |
| 374 | data.enter_barrier.reset(); | 367 | data.enter_barrier.reset(); |