VkVertexInputAttributeDescription
Each vertex input attribute is specified by the
VkVertexInputAttributeDescription
structure, defined as:
typedef struct VkVertexInputAttributeDescription {
uint32_t location;
uint32_t binding;
VkFormat format;
uint32_t offset;
} VkVertexInputAttributeDescription;
location
is the shader input location number for this attribute.binding
is the binding number which this attribute takes its data from.format
is the size and type of the vertex attribute data.offset
is a byte offset of this attribute relative to the start of an element in the vertex input binding.
Valid Usage
VUID-VkVertexInputAttributeDescription-location-00620
location
must be less than
VkPhysicalDeviceLimits
::maxVertexInputAttributes
VUID-VkVertexInputAttributeDescription-binding-00621
binding
must be less than
VkPhysicalDeviceLimits
::maxVertexInputBindings
VUID-VkVertexInputAttributeDescription-offset-00622
offset
must be less than or equal to
VkPhysicalDeviceLimits
::maxVertexInputAttributeOffset
VUID-VkVertexInputAttributeDescription-format-00623
The format features of
format
must contain VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT
VUID-VkVertexInputAttributeDescription-vertexAttributeAccessBeyondStride-04457
If the VK_KHR_portability_subset extension is enabled, and
VkPhysicalDevicePortabilitySubsetFeaturesKHR::vertexAttributeAccessBeyondStride
is VK_FALSE
, the sum of offset
plus the size of the vertex
attribute data described by format
must not be greater than
stride
in the VkVertexInputBindingDescription referenced in
binding
Valid Usage (Implicit)
VUID-VkVertexInputAttributeDescription-format-parameter
format
must be a valid VkFormat value