Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example: Validation layer error on VkSwapchainCreateInfoKHR #72

Closed
Axilot opened this issue Jun 3, 2021 · 2 comments
Closed

Example: Validation layer error on VkSwapchainCreateInfoKHR #72

Axilot opened this issue Jun 3, 2021 · 2 comments

Comments

@Axilot
Copy link

Axilot commented Jun 3, 2021

When recreating the swapchain, following validation layer is exposed:
[ERROR: Validation]
Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x5611ea7bf128, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (1024,718), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (1024,711), minImageExtent = (1024,711), maxImageExtent = (1024,711). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)

@charles-lunarg
Copy link
Owner

This is a 'Not a thing vk-bootstrap can solve' issue, which is why I'm closing it.
This happens because the 'moment' you query the swapchain image extent is possibly not the same moment the OS resizes the window (and thus changing the extent).

The issue tracking this is here.
KhronosGroup/Vulkan-Docs#1144

If you want a way to ignore this error, get & open VkConfig and add VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 to the Mute Message VUIDs in the settings for the validation layers. This will prevent validation from emitting the message.

@Axilot
Copy link
Author

Axilot commented Jun 4, 2021

Oh, sorry. Makes sense now, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants