mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 07:21:25 +12:00
rsx: Flush FIFO GET before smeaphore_acquire
This commit is contained in:
parent
70b4ae6bd6
commit
0b2fa6ffdc
3 changed files with 12 additions and 3 deletions
|
@ -2334,6 +2334,12 @@ namespace rsx
|
||||||
//verify (HERE), async_tasks_pending.load() == 0;
|
//verify (HERE), async_tasks_pending.load() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void thread::flush_fifo()
|
||||||
|
{
|
||||||
|
// Make sure GET value is exposed before sync points
|
||||||
|
fifo_ctrl->sync_get();
|
||||||
|
}
|
||||||
|
|
||||||
void thread::read_barrier(u32 memory_address, u32 memory_range)
|
void thread::read_barrier(u32 memory_address, u32 memory_range)
|
||||||
{
|
{
|
||||||
zcull_ctrl->read_barrier(this, memory_address, memory_range);
|
zcull_ctrl->read_barrier(this, memory_address, memory_range);
|
||||||
|
|
|
@ -518,6 +518,7 @@ namespace rsx
|
||||||
u32 restore_point = 0;
|
u32 restore_point = 0;
|
||||||
atomic_t<bool> external_interrupt_lock{ false };
|
atomic_t<bool> external_interrupt_lock{ false };
|
||||||
atomic_t<bool> external_interrupt_ack{ false };
|
atomic_t<bool> external_interrupt_ack{ false };
|
||||||
|
void flush_fifo();
|
||||||
|
|
||||||
// Performance approximation counters
|
// Performance approximation counters
|
||||||
struct
|
struct
|
||||||
|
|
|
@ -65,13 +65,15 @@ namespace rsx
|
||||||
rsx->sync_point_request = true;
|
rsx->sync_point_request = true;
|
||||||
const u32 addr = get_address(method_registers.semaphore_offset_406e(), method_registers.semaphore_context_dma_406e());
|
const u32 addr = get_address(method_registers.semaphore_offset_406e(), method_registers.semaphore_context_dma_406e());
|
||||||
|
|
||||||
const auto& sema = vm::_ref<atomic_t<be_t<u32>>>(addr);
|
const auto& sema = vm::_ref<atomic_be_t<u32>>(addr);
|
||||||
|
|
||||||
// TODO: Remove vblank semaphore hack
|
// TODO: Remove vblank semaphore hack
|
||||||
if (sema.load() == arg || addr == rsx->ctxt_addr + 0x30) return;
|
if (sema == arg || addr == rsx->ctxt_addr + 0x30) return;
|
||||||
|
|
||||||
|
rsx->flush_fifo();
|
||||||
|
|
||||||
u64 start = get_system_time();
|
u64 start = get_system_time();
|
||||||
while (sema.load() != arg)
|
while (sema != arg)
|
||||||
{
|
{
|
||||||
if (Emu.IsStopped())
|
if (Emu.IsStopped())
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue