mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
SPU: use reservation spinlocks on writes (non-TSX)
This should decrease contention by avoiding global lock
This commit is contained in:
parent
182259e4a5
commit
72574b11ff
5 changed files with 209 additions and 134 deletions
|
@ -118,14 +118,15 @@ namespace rsx
|
|||
rsx->sync_point_request = true;
|
||||
const u32 addr = get_address(method_registers.semaphore_offset_406e(), method_registers.semaphore_context_dma_406e());
|
||||
|
||||
if (g_use_rtm || addr >> 28 == 0x4)
|
||||
if (LIKELY(g_use_rtm))
|
||||
{
|
||||
vm::write32(addr, arg);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm::reader_lock lock;
|
||||
auto& res = vm::reservation_lock(addr, 4);
|
||||
vm::write32(addr, arg);
|
||||
res &= ~1ull;
|
||||
}
|
||||
|
||||
if (addr >> 28 != 0x4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue