diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 69fb98a259..fa76ff2480 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -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(); } diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index 42d48e6769..78a0fafd0c 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -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();