Skip to content

Commit

Permalink
Fixed invalid semaphore being used after swap chain recreation
Browse files Browse the repository at this point in the history
  • Loading branch information
nadult committed Dec 31, 2024
1 parent 6a29f03 commit aab8533
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vulkan/vulkan_swap_chain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ Ex<VkSemaphore> VulkanSwapChain::acquireImage() {
return nullptr;
}

auto semaphore = m_semaphores[m_semaphore_index];
VkSemaphore semaphore;
for(int retry = 0; retry < 2; retry++) {
semaphore = m_semaphores[m_semaphore_index];
VkResult result = vkAcquireNextImageKHR(deviceHandle(), m_handle, UINT64_MAX, semaphore,
VK_NULL_HANDLE, &m_image_index);
if(result == VK_SUCCESS)
Expand Down

0 comments on commit aab8533

Please sign in to comment.