Function Prototype

vkGetPhysicalDeviceImageFormatProperties2

Lists physical device's image format capabilities

To query additional capabilities specific to image types, call:

VkResult vkGetPhysicalDeviceImageFormatProperties2(
    VkPhysicalDevice physicalDevice,
    const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
    VkImageFormatProperties2* pImageFormatProperties);
VkResult vkGetPhysicalDeviceImageFormatProperties2KHR(
    VkPhysicalDevice physicalDevice,
    const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
    VkImageFormatProperties2* pImageFormatProperties);

vkGetPhysicalDeviceImageFormatProperties2 behaves similarly to vkGetPhysicalDeviceImageFormatProperties, with the ability to return extended information in a pNext chain of output structures.

If the pNext chain of pImageFormatInfo includes a VkVideoProfileListInfoKHR structure with a profileCount member greater than 0, then this command returns format capabilities specific to image types used in conjunction with the specified video profiles. In this case, this command will return one of the video-profile-specific error codes if any of the profiles specified via VkVideoProfileListInfoKHR::pProfiles are not supported. Furthermore, if VkPhysicalDeviceImageFormatInfo2::usage includes any image usage flag not supported by the specified video profiles, then this command returns VK_ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR.

If the hostImageCopy feature is supported, and:

  • pImageFormatInfo→usage includes VK_IMAGE_USAGE_SAMPLED_BIT
  • pImageFormatInfo→flags does not include either of VK_IMAGE_CREATE_SPARSE_BINDING_BIT, VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or VK_IMAGE_CREATE_SPARSE_ALIASED_BIT
  • The pNext chain of pImageFormatInfo does not include a VkPhysicalDeviceExternalImageFormatInfo structure with non-zero handleType
  • pImageFormatInfo→tiling is not VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT

Then the result of calls to vkGetPhysicalDeviceImageFormatProperties2 with identical parameters except for the inclusion of VK_IMAGE_USAGE_HOST_TRANSFER_BIT in pImageFormatInfo→usagemust be identical.

Valid Usage

VUID-vkGetPhysicalDeviceImageFormatProperties2-pNext-01868

If the pNext chain of pImageFormatProperties includes a VkAndroidHardwareBufferUsageANDROID structure, the pNext chain of pImageFormatInfo must include a VkPhysicalDeviceExternalImageFormatInfo structure with handleType set to VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID

VUID-vkGetPhysicalDeviceImageFormatProperties2-pNext-09004

If the pNext chain of pImageFormatProperties includes a VkHostImageCopyDevicePerformanceQuery structure, pImageFormatInfo→usage must contain VK_IMAGE_USAGE_HOST_TRANSFER_BIT