mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
rsx/vk: Fix WCB/Blit flush deadlock
This commit is contained in:
parent
8786516c58
commit
dfc626c99c
1 changed files with 10 additions and 6 deletions
|
@ -1047,6 +1047,8 @@ bool VKGSRender::on_access_violation(u32 address, bool is_writing)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool has_queue_ref = false;
|
bool has_queue_ref = false;
|
||||||
|
std::function<void()> data_transfer_completed_callback{};
|
||||||
|
|
||||||
if (!is_current_thread()) [[likely]]
|
if (!is_current_thread()) [[likely]]
|
||||||
{
|
{
|
||||||
// Always submit primary cb to ensure state consistency (flush pending changes such as image transitions)
|
// Always submit primary cb to ensure state consistency (flush pending changes such as image transitions)
|
||||||
|
@ -1073,17 +1075,19 @@ bool VKGSRender::on_access_violation(u32 address, bool is_writing)
|
||||||
{
|
{
|
||||||
// Wait for the RSX thread to process request if it hasn't already
|
// Wait for the RSX thread to process request if it hasn't already
|
||||||
m_flush_requests.producer_wait();
|
m_flush_requests.producer_wait();
|
||||||
}
|
|
||||||
|
|
||||||
m_texture_cache.flush_all(*m_secondary_cb_list.next(), result, [&]()
|
data_transfer_completed_callback = [&]()
|
||||||
{
|
{
|
||||||
m_flush_requests.remove_one();
|
m_flush_requests.remove_one();
|
||||||
has_queue_ref = false;
|
has_queue_ref = false;
|
||||||
});
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
m_texture_cache.flush_all(*m_secondary_cb_list.next(), result, data_transfer_completed_callback);
|
||||||
|
|
||||||
if (has_queue_ref)
|
if (has_queue_ref)
|
||||||
{
|
{
|
||||||
// Release RSX thread
|
// Release RSX thread if it's still locked
|
||||||
m_flush_requests.remove_one();
|
m_flush_requests.remove_one();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue