mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
vk: Restructure command queue flushing behavior to avoid deadlock
- Queueing commands on the offloader is a good idea but unfortunately page faults can still happen causing a cyclic dependency and eventual deadlock. Characterized by a vk::wait_for_event timed out error accompanied by severe hitching. - Drain the fault-able commands before pushing a submit operation to the queue. If a fault is in progress, bypass the queue system and submit raw. Technically this is incorrect but there isn't much that can be done about it right now.
This commit is contained in:
parent
a24514651c
commit
8bbda3dedb
6 changed files with 32 additions and 19 deletions
|
|
@ -137,12 +137,12 @@ namespace rsx
|
|||
return (std::this_thread::get_id() == m_thread_id);
|
||||
}
|
||||
|
||||
void dma_manager::sync()
|
||||
bool dma_manager::sync()
|
||||
{
|
||||
if (LIKELY(m_enqueued_count.load() == m_processed_count))
|
||||
{
|
||||
// Nothing to do
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (auto rsxthr = get_current_renderer(); rsxthr->is_current_thread())
|
||||
|
|
@ -150,7 +150,7 @@ namespace rsx
|
|||
if (m_mem_fault_flag)
|
||||
{
|
||||
// Abort if offloader is in recovery mode
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
while (m_enqueued_count.load() != m_processed_count)
|
||||
|
|
@ -164,6 +164,8 @@ namespace rsx
|
|||
while (m_enqueued_count.load() != m_processed_count)
|
||||
_mm_pause();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void dma_manager::join()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue