VkSamplerYcbcrConversionImageFormatProperties
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:
typedef struct VkSamplerYcbcrConversionImageFormatProperties {
VkStructureType sType;
void* pNext;
uint32_t combinedImageSamplerDescriptorCount;
} VkSamplerYcbcrConversionImageFormatProperties;
pub struct SamplerYcbcrConversionImageFormatProperties {
s_type: vk::StructureType,
p_next: *mut c_void,
combined_image_sampler_descriptor_count: u32,
}
typedef VkSamplerYcbcrConversionImageFormatProperties VkSamplerYcbcrConversionImageFormatPropertiesKHR;
type SamplerYcbcrConversionImageFormatPropertiesKHR = vk::SamplerYcbcrConversionImageFormatProperties;
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
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.
VkSamplerYcbcrConversionImageFormatProperties::combinedImageSamplerDescriptorCount
values of 2 and 3 respectively.
The maximum combinedImageSamplerDescriptorCount for this binding
layout is therefore 3.If there are 3 descriptors in a descriptor set binding with this layout,
including one descriptor without an immutable Y′CBCR sampler, the binding
will consume 9 combined image sampler descriptors from the descriptor
pool.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.
Valid Usage (Implicit)
VUID-VkSamplerYcbcrConversionImageFormatProperties-sType-sType
sType must be VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES