mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 20:22:30 +01:00
rsx/zcull: Pause the main thread before flushing reports
This commit is contained in:
parent
9e02471ded
commit
e9bf3e13d0
@ -336,7 +336,7 @@ error_code sys_rsx_context_iomap(cpu_thread& cpu, u32 context_id, u32 io, u32 ea
|
||||
|
||||
io >>= 20, ea >>= 20, size >>= 20;
|
||||
|
||||
render->pause();
|
||||
rsx::eng_lock fifo_lock(render);
|
||||
std::scoped_lock lock(render->sys_rsx_mtx);
|
||||
|
||||
for (u32 i = 0; i < size; i++)
|
||||
@ -350,7 +350,6 @@ error_code sys_rsx_context_iomap(cpu_thread& cpu, u32 context_id, u32 io, u32 ea
|
||||
table.io[ea + i].release((io + i) << 20);
|
||||
}
|
||||
|
||||
render->unpause();
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -429,13 +428,12 @@ error_code sys_rsx_context_attribute(u32 context_id, u32 package_id, u64 a3, u64
|
||||
{
|
||||
case 0x001: // FIFO
|
||||
{
|
||||
render->pause();
|
||||
rsx::eng_lock rlock(render);
|
||||
const u64 get = static_cast<u32>(a3);
|
||||
const u64 put = static_cast<u32>(a4);
|
||||
vm::_ref<atomic_be_t<u64>>(render->dma_address + ::offset32(&RsxDmaControl::put)).release(put << 32 | get);
|
||||
render->last_known_code_start = get;
|
||||
render->sync_point_request.release(true);
|
||||
render->unpause();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -874,4 +874,20 @@ namespace rsx
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class eng_lock
|
||||
{
|
||||
rsx::thread* pthr;
|
||||
public:
|
||||
eng_lock(rsx::thread* target)
|
||||
:pthr(target)
|
||||
{
|
||||
if (pthr) pthr->pause();
|
||||
}
|
||||
|
||||
~eng_lock()
|
||||
{
|
||||
if (pthr) pthr->unpause();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -848,7 +848,10 @@ namespace rsx
|
||||
|
||||
// Flush all pending writes
|
||||
m_critical_reports_in_flight += 0x100000;
|
||||
sync(ptimer);
|
||||
{
|
||||
rsx::eng_lock rlock(ptimer->is_current_thread() ? nullptr : ptimer);
|
||||
ptimer->sync();
|
||||
}
|
||||
m_critical_reports_in_flight -= 0x100000;
|
||||
|
||||
// Unlock pages
|
||||
|
Loading…
Reference in New Issue
Block a user