mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
RSX: fix rsx::nv406e::semaphore_release partially
Properly release reservation (non-TSX path). At least update and notify reservation (TSX).
This commit is contained in:
parent
facde63460
commit
492ed27495
@ -147,21 +147,33 @@ namespace rsx
|
||||
const u32 addr = get_address(offset, ctxt, HERE);
|
||||
|
||||
atomic_t<u64>* res{};
|
||||
bool upd = false;
|
||||
|
||||
// TODO: Check if possible to write on reservations
|
||||
if (!g_use_rtm && rsx->label_addr >> 28 != addr >> 28) [[likely]]
|
||||
if (rsx->label_addr >> 28 != addr >> 28)
|
||||
{
|
||||
res = &vm::reservation_lock(addr).first;
|
||||
if (g_use_rtm)
|
||||
{
|
||||
upd = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
res = &vm::reservation_lock(addr).first;
|
||||
}
|
||||
}
|
||||
|
||||
vm::_ref<RsxSemaphore>(addr).val = arg;
|
||||
|
||||
if (res)
|
||||
{
|
||||
res += 64;
|
||||
res->fetch_add(64);
|
||||
res->notify_all();
|
||||
}
|
||||
else if (upd)
|
||||
{
|
||||
// TODO: simply writing semaphore from RSX thread is wrong on TSX path
|
||||
vm::reservation_update(addr);
|
||||
}
|
||||
|
||||
vm::reservation_notifier(addr, 4).notify_all();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user