C Specification
To determine the number of descriptors required to support
an image format for sampled images with Y′CBCR
conversion, add VkSamplerYcbcrConversionImageFormatProperties to the
pNext chain of the VkImageFormatProperties2 structure in a call
to vkGetPhysicalDeviceImageFormatProperties2.
The VkSamplerYcbcrConversionImageFormatProperties structure is defined
as:
// Provided by VK_VERSION_1_1
typedef struct VkSamplerYcbcrConversionImageFormatProperties {
VkStructureType sType;
void* pNext;
uint32_t combinedImageSamplerDescriptorCount;
} VkSamplerYcbcrConversionImageFormatProperties;
// Provided by VK_KHR_sampler_ycbcr_conversion
// Equivalent to VkSamplerYcbcrConversionImageFormatProperties
typedef VkSamplerYcbcrConversionImageFormatProperties VkSamplerYcbcrConversionImageFormatPropertiesKHR;
Members
-
sTypeis a VkStructureType value identifying this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
combinedImageSamplerDescriptorCountis the number of descriptors that the implementation uses to access a sampled image with Y′CBCR conversion
Description
combinedImageSamplerDescriptorCount is a number between 1 and the
number of planes in the format.
The size an image descriptor with a VkSamplerYcbcrConversionInfo
structure consumes in the resource heap is multiplied by the
combinedImageSamplerDescriptorCount of its format.
These images are sampled with embedded samplers and therefore do not consume
space in the sampler heap.
For
descriptor buffers or
descriptor sets, each combined image sampler descriptor binding with a
layout that includes at least one immutable Y′CBCR conversion sampler will
internally use a number of descriptors equal to the maximum
combinedImageSamplerDescriptorCount of the formats of all the
immutable Y′CBCR conversion samplers in that 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.
|
Note
|
All descriptors in a binding use the same expanded number of descriptors to allow implementations to use a uniform stride for dynamic indexing. For example, consider a descriptor set layout binding with two immutable
Y′CBCR samplers with formats that have
If there are For descriptor heaps, the application explicitly maps the descriptor binding to a heap offset with VkDescriptorSetAndBindingMappingEXT and should make similar calculations as it must offset each element in the binding correctly. |
Instead of querying all the potential formats that an application might use,
it can use
VkPhysicalDeviceMaintenance6Properties::maxCombinedImageSamplerDescriptorCount
property to determine the maximum combinedImageSamplerDescriptorCount
for all formats the implementation supports.
Document Notes
For more information, see the Vulkan Specification.
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.