rsx: Asynchronously flush the pipelines when handing ZCULL memory access violations

This commit is contained in:
kd-11 2022-05-21 00:53:48 +03:00 committed by kd-11
parent 0e1333ed5f
commit 4e6be9172a
3 changed files with 11 additions and 6 deletions

View File

@ -1070,6 +1070,11 @@ namespace rsx
}
}
}
if (m_eng_interrupt_mask & rsx::pipe_flush_interrupt)
{
sync();
}
}
std::array<u32, 4> thread::get_color_surface_addresses() const
@ -2612,6 +2617,8 @@ namespace rsx
void thread::sync()
{
m_eng_interrupt_mask.clear(rsx::pipe_flush_interrupt);
if (zcull_ctrl->has_pending())
{
zcull_ctrl->sync(this);

View File

@ -168,8 +168,9 @@ namespace rsx
backend_interrupt = 0x0001, // Backend-related interrupt
memory_config_interrupt = 0x0002, // Memory configuration changed
display_interrupt = 0x0004, // Display handling
pipe_flush_interrupt = 0x0008, // Flush pipelines
all_interrupt_bits = memory_config_interrupt | backend_interrupt | display_interrupt
all_interrupt_bits = memory_config_interrupt | backend_interrupt | display_interrupt | pipe_flush_interrupt
};
enum FIFO_state : u8

View File

@ -836,11 +836,6 @@ namespace rsx
rsx_log.warning("Reports area at location %s was accessed. ZCULL optimizations will be disabled.", location_tostring(location));
m_pages_accessed[location] = true;
// Flush all pending writes
m_critical_reports_in_flight += 0x100000;
ptimer->sync();
m_critical_reports_in_flight -= 0x100000;
// Unlock pages
for (auto& p : m_locked_pages[location])
{
@ -911,6 +906,8 @@ namespace rsx
rsx::eng_lock rlock(thr);
std::scoped_lock lock(m_pages_mutex);
disable_optimizations(thr, location);
thr->m_eng_interrupt_mask |= rsx::pipe_flush_interrupt;
return true;
}