SaschaWillems / VulkanCapsViewer

Vulkan hardware capability viewer
GNU Lesser General Public License v3.0
319 stars 70 forks source link

Avoid double-query with VK_EXT_host_image_copy #217

Open ShabbyX opened 1 month ago

ShabbyX commented 1 month ago

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 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.