mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
Fix properly RSX replay thread stop bug
This commit is contained in:
parent
aff871f127
commit
4f5348c7d4
3 changed files with 23 additions and 15 deletions
|
|
@ -48,6 +48,17 @@ static void set_rsx_dmactl(rsx::thread* render, u64 get_put)
|
|||
// Unconditional set
|
||||
while (!render->new_get_put.compare_and_swap_test(u64{umax}, get_put))
|
||||
{
|
||||
// Wait for the first store to complete (or be aborted)
|
||||
if (auto cpu = cpu_thread::get_current())
|
||||
{
|
||||
if (cpu->state & cpu_flag::exit)
|
||||
{
|
||||
// Retry
|
||||
cpu->state += cpu_flag::again;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
utils::pause();
|
||||
}
|
||||
|
||||
|
|
@ -60,12 +71,13 @@ static void set_rsx_dmactl(rsx::thread* render, u64 get_put)
|
|||
// Wait for the first store to complete (or be aborted)
|
||||
while (render->new_get_put != usz{umax})
|
||||
{
|
||||
if (Emu.IsStopped())
|
||||
if (cpu->state & cpu_flag::exit)
|
||||
{
|
||||
if (render->new_get_put.compare_and_swap_test(get_put, umax))
|
||||
{
|
||||
// Retry
|
||||
cpu->state += cpu_flag::again;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue