You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In all the example applications which support swapchain recreation (hello_world, multi_invokee_rendering, model_loader, ray_tracing_triangle_meshes), swapchain recreation works fine when the image is resized, but problems occur when the window is minimized (leading to image size of 0, 0) or restored (if the problems didn't occur before, they occur here - still because of image size 0, 0).
In Debug mode, validation errors occur:
[Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01689 ] Object 0: handle = 0x1444f005268, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x13140d69 | vkCreateSwapchainKHR(): pCreateInfo->imageExtent = (0, 0) which is illegal. The Vulkan spec states: imageExtent members width and height must both be non-zero (https://vulkan.lunarg.com/doc/view/1.2.162.0/windows/1.2-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01689)
While hello_world only displays the validation errors and continues to work afterwards, model_loader and ray_tracing_triangle_meshes completely fail and crash.
The problem definitely has to do with recreating an image_view and I think that at least one problem is the std::holds_alternative<vk::Image>(aTemplate->mImage)-case in root::create_image_from_template. The image views from the swap chain are wrapped in image directly and are not created via root::create_image. Therefore, the image_t::mCreateInfo member does not contain valid information, and when attempting to create a new image from a template, an image of size 0, 0 fails to be created. (I'm not 100% sure about this, though => exact reasons are to be investigated!)
Definition of done:
The window minimization/restoration case is handled properly by the framework
The swapchain is recreated properly for these cases
When image size is 0, 0, no new images or image_views are attempted to be created (would fail anyways... at the latest when allocating memory via VMA, I think.)
No validation errors are shown anymore because the case has been properly handled
The hello_world example's window can be minimized and restored without errors or crashes.
The multi_invokee_rendering example's window can be minimized and restored without errors or crashes.
The model_loader example's window can be minimized and restored without errors or crashes.
The ray_tracing_triangle_meshes example's window can be minimized and restored without errors or crashes.
In all the example applications which support swapchain recreation (
hello_world
,multi_invokee_rendering
,model_loader
,ray_tracing_triangle_meshes
), swapchain recreation works fine when the image is resized, but problems occur when the window is minimized (leading to image size of0, 0
) or restored (if the problems didn't occur before, they occur here - still because of image size0, 0
).In Debug mode, validation errors occur:
While
hello_world
only displays the validation errors and continues to work afterwards,model_loader
andray_tracing_triangle_meshes
completely fail and crash.The problem definitely has to do with recreating an
image_view
and I think that at least one problem is thestd::holds_alternative<vk::Image>(aTemplate->mImage)
-case inroot::create_image_from_template
. The image views from the swap chain are wrapped inimage
directly and are not created viaroot::create_image
. Therefore, theimage_t::mCreateInfo
member does not contain valid information, and when attempting to create a new image from a template, an image of size0, 0
fails to be created. (I'm not 100% sure about this, though => exact reasons are to be investigated!)Definition of done:
0, 0
, no newimage
s orimage_view
s are attempted to be created (would fail anyways... at the latest when allocating memory via VMA, I think.)hello_world
example's window can be minimized and restored without errors or crashes.multi_invokee_rendering
example's window can be minimized and restored without errors or crashes.model_loader
example's window can be minimized and restored without errors or crashes.ray_tracing_triangle_meshes
example's window can be minimized and restored without errors or crashes.The text was updated successfully, but these errors were encountered: