diff options
| author | 2022-06-16 23:42:39 -0400 | |
|---|---|---|
| committer | 2022-06-16 23:43:35 -0400 | |
| commit | a6371fb69dc87a65b766a2a274e6cf25459b8975 (patch) | |
| tree | 5da9f8475543baf027cb0885bb35f06258c48d06 /src/core/cpu_manager.cpp | |
| parent | Merge pull request #8472 from german77/tace (diff) | |
| download | yuzu-a6371fb69dc87a65b766a2a274e6cf25459b8975.tar.gz yuzu-a6371fb69dc87a65b766a2a274e6cf25459b8975.tar.xz yuzu-a6371fb69dc87a65b766a2a274e6cf25459b8975.zip | |
core: fix initialization in single core, sync GPU mode
Diffstat (limited to 'src/core/cpu_manager.cpp')
| -rw-r--r-- | src/core/cpu_manager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index 1c07dc90e..d69b2602a 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp | |||
| @@ -26,6 +26,7 @@ void CpuManager::ThreadStart(std::stop_token stop_token, CpuManager& cpu_manager | |||
| 26 | 26 | ||
| 27 | void CpuManager::Initialize() { | 27 | void CpuManager::Initialize() { |
| 28 | num_cores = is_multicore ? Core::Hardware::NUM_CPU_CORES : 1; | 28 | num_cores = is_multicore ? Core::Hardware::NUM_CPU_CORES : 1; |
| 29 | gpu_barrier = std::make_unique<Common::Barrier>(num_cores + 1); | ||
| 29 | 30 | ||
| 30 | for (std::size_t core = 0; core < num_cores; core++) { | 31 | for (std::size_t core = 0; core < num_cores; core++) { |
| 31 | core_data[core].host_thread = std::jthread(ThreadStart, std::ref(*this), core); | 32 | core_data[core].host_thread = std::jthread(ThreadStart, std::ref(*this), core); |
| @@ -230,6 +231,8 @@ void CpuManager::RunThread(std::size_t core) { | |||
| 230 | }); | 231 | }); |
| 231 | 232 | ||
| 232 | // Running | 233 | // Running |
| 234 | gpu_barrier->Sync(); | ||
| 235 | |||
| 233 | if (!is_async_gpu && !is_multicore) { | 236 | if (!is_async_gpu && !is_multicore) { |
| 234 | system.GPU().ObtainContext(); | 237 | system.GPU().ObtainContext(); |
| 235 | } | 238 | } |