You can avoid this by providing a large-enough array size to pCopySrcLayouts and pCopyDstLayouts in the very first query. Given the current number of enums in VkImageLayout, an array of say 100 entries should be more than enough for the foreseeable future.
The following code does two queries to get the device properties: https://github.com/SaschaWillems/VulkanCapsViewer/blob/bb8d5e2f9529b61221f7da25d208af94a72e5210/VulkanDeviceInfoExtensions.cpp#L363
You can avoid this by providing a large-enough array size to
pCopySrcLayouts
andpCopyDstLayouts
in the very first query. Given the current number of enums inVkImageLayout
, an array of say 100 entries should be more than enough for the foreseeable future.