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 authored Sep 15, 2023
1 parent 976b8c6 commit 91b55bd
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 @@ -299,7 +299,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 @@ -351,7 +352,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 91b55bd

Please sign in to comment.