From 3eabec0030e6ea14e22222a5c32da03e05abefa8 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Tue, 7 Apr 2020 15:41:38 +0300 Subject: [PATCH] SPU: Fix SPU Precise interpreter --- rpcs3/Emu/Cell/SPURecompiler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index 3ab064e918..29653d8a89 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -416,6 +416,8 @@ void spu_cache::initialize() } } + u32 worker_count = 0; + if (g_cfg.core.spu_decoder == spu_decoder_type::asmjit || g_cfg.core.spu_decoder == spu_decoder_type::llvm) { // Initialize progress dialog (wait for previous progress done) @@ -426,9 +428,11 @@ void spu_cache::initialize() g_progr = "Building SPU cache..."; g_progr_ptotal += ::size32(func_list); + + worker_count = Emu.GetMaxThreads(); } - named_thread_group workers("SPU Worker ", Emu.GetMaxThreads(), [&]() -> uint + named_thread_group workers("SPU Worker ", worker_count, [&]() -> uint { // Initialize compiler instances for parallel compilation std::unique_ptr compiler;