C Specification
The VkDescriptorBufferInfo
structure is defined as:
// Provided by VK_VERSION_1_0
typedef struct VkDescriptorBufferInfo {
VkBuffer buffer;
VkDeviceSize offset;
VkDeviceSize range;
} VkDescriptorBufferInfo;
Members
-
buffer
is VK_NULL_HANDLE or the buffer resource. -
offset
is the offset in bytes from the start ofbuffer
. Access to buffer memory via this descriptor uses addressing that is relative to this starting offset. -
range
is the size in bytes that is used for this descriptor update, orVK_WHOLE_SIZE
to use the range fromoffset
to the end of the buffer.
When setting range
to VK_WHOLE_SIZE
, the
effective range must not be larger than the
maximum range for the descriptor type (maxUniformBufferRange
or maxStorageBufferRange
).
This means that VK_WHOLE_SIZE
is not typically useful in the common
case where uniform buffer descriptors are suballocated from a buffer that is
much larger than maxUniformBufferRange
.
Description
For VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
and
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
descriptor types,
offset
is the base offset from which the dynamic offset is applied and
range
is the static size used for all dynamic offsets.
When range
is VK_WHOLE_SIZE
the effective range is calculated at
vkUpdateDescriptorSets is by taking the size of buffer
minus the
offset
.
See Also
VK_VERSION_1_0, VkBuffer, VkDeviceSize
, VkWriteDescriptorSet
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.