Additional Capabilities

This chapter describes additional capabilities beyond the minimum capabilities described in the Limits and Formats chapters, including:

Additional Image Capabilities

Additional image capabilities, such as larger dimensions or additional sample counts for certain image types, or additional capabilities for linear tiling format images, are described in this section.

vkGetPhysicalDeviceImageFormatPropertiesLists physical device’s image format capabilities
VkImageFormatPropertiesStructure specifying an image format properties
vkGetPhysicalDeviceExternalImageFormatPropertiesNVDetermine image capabilities compatible with external memory handle types
VkExternalImageFormatPropertiesNVStructure specifying external image format properties
VkExternalMemoryFeatureFlagBitsNVBitmask specifying external memory features
VkExternalMemoryFeatureFlagsNVBitmask of VkExternalMemoryFeatureFlagBitsNV
vkGetPhysicalDeviceImageFormatProperties2Lists physical device’s image format capabilities
VkPhysicalDeviceImageFormatInfo2Structure specifying image creation parameters
VkImageFormatProperties2Structure specifying an image format properties
VkTextureLODGatherFormatPropertiesAMDStructure informing whether or not texture gather bias/LOD functionality is supported for a given image format and a given physical device.
VkPhysicalDeviceExternalImageFormatInfoStructure specifying external image creation parameters
VkExternalMemoryHandleTypeFlagBitsBit specifying external memory handle types
VkExternalMemoryHandleTypeFlagsBitmask of VkExternalMemoryHandleTypeFlagBits
VkExternalImageFormatPropertiesStructure specifying supported external handle properties
VkExternalMemoryPropertiesStructure specifying external memory handle type capabilities
VkExternalMemoryFeatureFlagBitsBitmask specifying features of an external memory handle type
VkExternalMemoryFeatureFlagsBitmask of VkExternalMemoryFeatureFlagBits
VkPhysicalDeviceImageDrmFormatModifierInfoEXTStructure specifying a DRM format modifier as image creation parameter
VkSamplerYcbcrConversionImageFormatPropertiesStructure specifying combined image sampler descriptor count for multi-planar images

combinedImageSamplerDescriptorCount is a number between 1 and the number of planes in the format. A descriptor set layout binding with immutable Y′CBCR conversion samplers will have a maximum combinedImageSamplerDescriptorCount which is the maximum across all formats supported by its samplers of the combinedImageSamplerDescriptorCount for each format. Descriptor sets with that layout will internally use that maximum combinedImageSamplerDescriptorCount descriptors for each descriptor in the binding. This expanded number of descriptors will be consumed from the descriptor pool when a descriptor set is allocated, and counts towards the maxDescriptorSetSamplers, maxDescriptorSetSampledImages, maxPerStageDescriptorSamplers, and maxPerStageDescriptorSampledImages limits.

All descriptors in a binding use the same maximum combinedImageSamplerDescriptorCount descriptors to allow implementations to use a uniform stride for dynamic indexing of the descriptors in the binding.

For example, consider a descriptor set layout binding with two descriptors and immutable samplers for multi-planar formats that have VkSamplerYcbcrConversionImageFormatProperties::combinedImageSamplerDescriptorCount values of 2 and 3 respectively. There are two descriptors in the binding and the maximum combinedImageSamplerDescriptorCount is 3, so descriptor sets with this layout consume 6 descriptors from the descriptor pool. To create a descriptor pool that allows allocating four descriptor sets with this layout, descriptorCount must be at least 24.

Instead of querying all the potential formats that the application might use in the descriptor layout, the application can use the VkPhysicalDeviceMaintenance6PropertiesKHR::maxCombinedImageSamplerDescriptorCount property to determine the maximum descriptor size that will accommodate any and all formats that require a sampler Y′CBCR conversion supported by the implementation.

VkAndroidHardwareBufferUsageANDROIDStruct containing Android hardware buffer usage flags
VkHostImageCopyDevicePerformanceQueryEXTStruct containing information about optimality of device access

To determine if cubic filtering can be used with a given image format and a given image view type add a VkPhysicalDeviceImageViewImageFormatInfoEXT structure to the pNext chain of the VkPhysicalDeviceImageFormatInfo2 structure, and a VkFilterCubicImageViewImageFormatPropertiesEXT structure to the pNext chain of the VkImageFormatProperties2 structure.

VkPhysicalDeviceImageViewImageFormatInfoEXTStructure for providing image view type
VkFilterCubicImageViewImageFormatPropertiesEXTStructure for querying cubic filtering capabilities of an image view type

Supported Sample Counts

vkGetPhysicalDeviceImageFormatProperties returns a bitmask of VkSampleCountFlagBits in sampleCounts specifying the supported sample counts for the image parameters.

sampleCounts will be set to VK_SAMPLE_COUNT_1_BIT if at least one of the following conditions is true:

  • tiling is VK_IMAGE_TILING_LINEAR
  • type is not VK_IMAGE_TYPE_2D
  • flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT
  • Neither the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag nor the VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT flag in VkFormatProperties::optimalTilingFeatures returned by vkGetPhysicalDeviceFormatProperties is set
  • VkPhysicalDeviceExternalImageFormatInfo::handleType is an external handle type for which multisampled image support is not required.
  • format is one of the formats that require a sampler Y′CBCR conversion
  • usage contains VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
  • usage contains VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT

Otherwise, the bits set in sampleCounts will be the sample counts supported for the specified values of usage and format. For each bit set in usage, the supported sample counts relate to the limits in VkPhysicalDeviceLimits as follows:

  • If usage includes VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT and format is a floating- or fixed-point color format, a superset of VkPhysicalDeviceLimits::framebufferColorSampleCounts
  • If usage includes VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and format includes a depth component, a superset of VkPhysicalDeviceLimits::framebufferDepthSampleCounts
  • If usage includes VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and format includes a stencil component, a superset of VkPhysicalDeviceLimits::framebufferStencilSampleCounts
  • If usage includes VK_IMAGE_USAGE_SAMPLED_BIT, and format includes a color component, a superset of VkPhysicalDeviceLimits::sampledImageColorSampleCounts
  • If usage includes VK_IMAGE_USAGE_SAMPLED_BIT, and format includes a depth component, a superset of VkPhysicalDeviceLimits::sampledImageDepthSampleCounts
  • If usage includes VK_IMAGE_USAGE_SAMPLED_BIT, and format is an integer format, a superset of VkPhysicalDeviceLimits::sampledImageIntegerSampleCounts
  • If usage includes VK_IMAGE_USAGE_STORAGE_BIT, a superset of VkPhysicalDeviceLimits::storageImageSampleCounts

If multiple bits are set in usage, sampleCounts will be the intersection of the per-usage values described above.

If none of the bits described above are set in usage, then there is no corresponding limit in VkPhysicalDeviceLimits. In this case, sampleCounts must include at least VK_SAMPLE_COUNT_1_BIT.

Allowed Extent Values Based on Image Type

Implementations may support extent values larger than the required minimum/maximum values for certain types of images. VkImageFormatProperties::maxExtent for each type is subject to the constraints below.

Implementations must support images with dimensions up to the required minimum/maximum values for all types of images. It follows that the query for additional capabilities must return extent values that are at least as large as the required values.

For VK_IMAGE_TYPE_1D:

For VK_IMAGE_TYPE_2D when flags does not contain VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT:

For VK_IMAGE_TYPE_2D when flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT:

For VK_IMAGE_TYPE_3D:

Additional Buffer Capabilities

vkGetPhysicalDeviceExternalBufferPropertiesQuery external handle types supported by buffers
VkPhysicalDeviceExternalBufferInfoStructure specifying buffer creation parameters
VkExternalBufferPropertiesStructure specifying supported external handle capabilities

Optional Semaphore Capabilities

vkGetPhysicalDeviceExternalSemaphorePropertiesFunction for querying external semaphore handle capabilities.
VkPhysicalDeviceExternalSemaphoreInfoStructure specifying semaphore creation parameters.
VkExternalSemaphoreHandleTypeFlagBitsBitmask of valid external semaphore handle types
VkExternalSemaphoreHandleTypeFlagsBitmask of VkExternalSemaphoreHandleTypeFlagBits
VkExternalSemaphorePropertiesStructure describing supported external semaphore handle features
VkExternalSemaphoreFeatureFlagBitsBitfield describing features of an external semaphore handle type
VkExternalSemaphoreFeatureFlagsBitmask of VkExternalSemaphoreFeatureFlagBitsKHR

Optional Fence Capabilities

vkGetPhysicalDeviceExternalFencePropertiesFunction for querying external fence handle capabilities.
VkPhysicalDeviceExternalFenceInfoStructure specifying fence creation parameters.
VkExternalFenceHandleTypeFlagBitsBitmask of valid external fence handle types
VkExternalFenceHandleTypeFlagsBitmask of VkExternalFenceHandleTypeFlagBits
VkExternalFencePropertiesStructure describing supported external fence handle features
VkExternalFenceFeatureFlagBitsBitfield describing features of an external fence handle type
VkExternalFenceFeatureFlagsBitmask of VkExternalFenceFeatureFlagBits

Timestamp Calibration Capabilities

vkGetPhysicalDeviceCalibrateableTimeDomainsKHRQuery calibrateable time domains