rsx: Workaround for exit deadlock

- Avoids games locking up when the stop button is pressed
This commit is contained in:
kd-11 2019-09-12 18:35:11 +03:00 committed by kd-11
parent cc313b052f
commit 52e8747b83
2 changed files with 10 additions and 0 deletions

View File

@ -606,6 +606,13 @@ namespace rsx
void thread::on_exit()
{
// Deregister violation handler
g_access_violation_handler = nullptr;
// Clear any pending flush requests to release threads
std::this_thread::sleep_for(10ms);
do_local_task(rsx::FIFO_state::lock_wait);
m_rsx_thread_exiting = true;
g_dma_manager.join();
}

View File

@ -545,6 +545,9 @@ VKGSRender::~VKGSRender()
//Wait for device to finish up with resources
vkDeviceWaitIdle(*m_device);
// Clear flush requests
m_flush_requests.clear_pending_flag();
//Texture cache
m_texture_cache.destroy();