Skip to content

Commit

Permalink
vulkan: fix fence deadlock (#7173)
Browse files Browse the repository at this point in the history
Should only reset fences in VulkanCommands::gc
  • Loading branch information
poweifeng committed Sep 15, 2023
1 parent f0a0a9b commit fdffd93
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions filament/backend/src/vulkan/VulkanCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -339,7 +340,7 @@ void VulkanCommands::wait() {
}
if (count > 0) {
vkWaitForFences(mDevice, count, fences, VK_TRUE, UINT64_MAX);
vkResetFences(mDevice, count, fences);
updateFences();
}
}

Expand Down

0 comments on commit fdffd93

Please sign in to comment.