From 620188e26795d562ebf41d57c0af6c4387c8da99 Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Fri, 27 Sep 2024 17:13:30 +0300 Subject: [PATCH] Update SPUThread.cpp --- rpcs3/Emu/Cell/SPUThread.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index 625d376361..5effd0c7af 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -4899,7 +4899,7 @@ bool spu_thread::process_mfc_cmd() if (is_spurs_task_wait) { // Wait for other threads to complete their tasks (temporarily) - const u32 max_run = group->max_run; + u32 max_run = group->max_run; u32 prev_running = group->spurs_running; @@ -4917,6 +4917,7 @@ bool spu_thread::process_mfc_cmd() thread_ctrl::wait_on(group->spurs_running, prev_running, 10000 - (current - before)); + max_run = group->max_run; prev_running = group->spurs_running; if (prev_running <= max_run) @@ -5567,7 +5568,7 @@ s64 spu_thread::get_ch_value(u32 ch) // Wait for other threads to complete their tasks (temporarily) if (!is_stopped()) { - const u32 max_run = group->max_run; + u32 max_run = group->max_run; u32 prev_running = group->spurs_running.fetch_op([max_run](u32& x) { @@ -5596,6 +5597,8 @@ s64 spu_thread::get_ch_value(u32 ch) thread_ctrl::wait_on(group->spurs_running, prev_running, 10000 - (current - before)); + max_run = group->max_run; + prev_running = group->spurs_running.fetch_op([max_run](u32& x) { if (x < max_run)