vulkan: fix fence deadlock (#7173)

Should only reset fences in VulkanCommands::gc
This commit is contained in:
Powei Feng
2023-09-14 17:09:33 -07:00
parent f0a0a9b2e1
commit fdffd93949

View File

@@ -287,7 +287,8 @@ bool VulkanCommands::flush() {
slog.i << "Submitting cmdbuffer=" << cmdbuffer
<< " wait=(" << signals[0] << ", " << signals[1] << ") "
<< " signal=" << renderingFinished
<< io::endl;
<< " fence=" << currentbuf->fence->fence
<< utils::io::endl;
#endif
auto& cmdfence = currentbuf->fence;
@@ -339,7 +340,7 @@ void VulkanCommands::wait() {
}
if (count > 0) {
vkWaitForFences(mDevice, count, fences, VK_TRUE, UINT64_MAX);
vkResetFences(mDevice, count, fences);
updateFences();
}
}