Skip to content

Commit 53f8ddf

Browse files
Vulkan swap chain: removed image acquire status debug checks (fix #632)
The image may be immediately out of date after it is acquired
1 parent a255d24 commit 53f8ddf

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ SwapChainVkImpl::SwapChainVkImpl(IReferenceCounters* pRefCounters,
5454
CreateSurface();
5555
CreateVulkanSwapChain();
5656
InitBuffersAndViews();
57-
VkResult res = AcquireNextImage(pDeviceContextVk);
58-
DEV_CHECK_ERR(res == VK_SUCCESS, "Failed to acquire next image for the newly created swap chain");
59-
(void)res;
57+
58+
AcquireNextImage(pDeviceContextVk);
59+
// Note that the image may be immediately out of date.
6060

6161
FenceDesc FenceCI;
6262
FenceCI.Name = "Swap chain frame complete fence";
@@ -745,7 +745,7 @@ void SwapChainVkImpl::Present(Uint32 SyncInterval)
745745
}
746746
#endif
747747
}
748-
DEV_CHECK_ERR(res == VK_SUCCESS, "Failed to acquire next swap chain image");
748+
// The image may still be out of date if the window keeps changing size
749749
}
750750
}
751751

@@ -919,9 +919,8 @@ void SwapChainVkImpl::Resize(Uint32 NewWidth, Uint32 NewHeight, SURFACE_TRANSFOR
919919
// RecreateVulkanSwapchain() unbinds default FB
920920
RecreateVulkanSwapchain(pImmediateCtxVk);
921921

922-
VkResult res = AcquireNextImage(pImmediateCtxVk);
923-
DEV_CHECK_ERR(res == VK_SUCCESS, "Failed to acquire next image for the just resized swap chain");
924-
(void)res;
922+
AcquireNextImage(pImmediateCtxVk);
923+
// The image may be immediately out of date if the window keeps being resized
925924
}
926925
catch (const std::runtime_error&)
927926
{

0 commit comments

Comments
 (0)