summaryrefslogtreecommitdiffstats
path: root/src/core/cpu_manager.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-06-17 09:08:15 +0200
committerGitHub <noreply@github.com>2022-06-17 09:08:15 +0200
commit5b2b15091f38eb169648ddad4ae32f03354d19cd (patch)
tree5da9f8475543baf027cb0885bb35f06258c48d06 /src/core/cpu_manager.cpp
parentMerge pull request #8472 from german77/tace (diff)
parentcore: fix initialization in single core, sync GPU mode (diff)
downloadyuzu-5b2b15091f38eb169648ddad4ae32f03354d19cd.tar
yuzu-5b2b15091f38eb169648ddad4ae32f03354d19cd.tar.gz
yuzu-5b2b15091f38eb169648ddad4ae32f03354d19cd.tar.bz2
yuzu-5b2b15091f38eb169648ddad4ae32f03354d19cd.tar.lz
yuzu-5b2b15091f38eb169648ddad4ae32f03354d19cd.tar.xz
yuzu-5b2b15091f38eb169648ddad4ae32f03354d19cd.tar.zst
yuzu-5b2b15091f38eb169648ddad4ae32f03354d19cd.zip
Diffstat (limited to '')
-rw-r--r--src/core/cpu_manager.cpp3
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
void CpuManager::Initialize() {
num_cores = is_multicore ? Core::Hardware::NUM_CPU_CORES : 1;
+ gpu_barrier = std::make_unique<Common::Barrier>(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();
}