From a6371fb69dc87a65b766a2a274e6cf25459b8975 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 16 Jun 2022 23:42:39 -0400 Subject: core: fix initialization in single core, sync GPU mode --- src/core/cpu_manager.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/cpu_manager.cpp') 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 void CpuManager::Initialize() { num_cores = is_multicore ? Core::Hardware::NUM_CPU_CORES : 1; + gpu_barrier = std::make_unique(num_cores + 1); for (std::size_t core = 0; core < num_cores; core++) { core_data[core].host_thread = std::jthread(ThreadStart, std::ref(*this), core); @@ -230,6 +231,8 @@ void CpuManager::RunThread(std::size_t core) { }); // Running + gpu_barrier->Sync(); + if (!is_async_gpu && !is_multicore) { system.GPU().ObtainContext(); } -- cgit v1.2.3