vkGetPhysicalDeviceDescriptorSizeEXT
To query the size of heap descriptor for a specific VkDescriptorType, call:
VkDeviceSize vkGetPhysicalDeviceDescriptorSizeEXT(
VkPhysicalDevice physicalDevice,
VkDescriptorType descriptorType);
pub fn get_physical_device_descriptor_size_ext(
physical_device: vk::PhysicalDevice,
descriptor_type: vk::DescriptorType,
) -> vk::DeviceSize;
physicalDeviceis the physical device from which to query the descriptor sizes.descriptorTypeis a VkDescriptorType specifying the type of heap descriptor to query the size for.
The return value of this function will be a VkDeviceSize indicating
the size in bytes (N) of a heap descriptor with a type equal to
descriptorType.
When a descriptor of this type is written by
vkWriteResourceDescriptorsEXT or vkWriteSamplerDescriptorsEXT,
only the first N bytes are written; the rest will not be accessed and
can be safely discarded when copying descriptors around.
Additionally, those first N bytes are the only bytes that will be
accessed when the descriptor is accessed in the shader.
N will never be larger than the applicable limits in
VkPhysicalDeviceDescriptorHeapTensorPropertiesARM or
VkPhysicalDeviceDescriptorHeapPropertiesEXT.
Valid Usage
VUID-vkGetPhysicalDeviceDescriptorSizeEXT-type-11362
type must be one of VK_DESCRIPTOR_TYPE_SAMPLER,
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER,
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER,
VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM,
VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM,
VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR,
VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV,
VK_DESCRIPTOR_TYPE_PARTITIONED_ACCELERATION_STRUCTURE_NV,
VK_DESCRIPTOR_TYPE_TENSOR_ARM,
or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
Valid Usage (Implicit)
VUID-vkGetPhysicalDeviceDescriptorSizeEXT-physicalDevice-parameter
physicalDevice must be a valid VkPhysicalDevice handle
VUID-vkGetPhysicalDeviceDescriptorSizeEXT-descriptorType-parameter
descriptorType must be a valid VkDescriptorType value