C Specification
The individual divisor values per binding are specified using the
VkVertexInputBindingDivisorDescriptionKHR
structure which is defined
as:
// Provided by VK_KHR_vertex_attribute_divisor
typedef struct VkVertexInputBindingDivisorDescriptionKHR {
uint32_t binding;
uint32_t divisor;
} VkVertexInputBindingDivisorDescriptionKHR;
or the equivalent
// Provided by VK_EXT_vertex_attribute_divisor
typedef VkVertexInputBindingDivisorDescriptionKHR VkVertexInputBindingDivisorDescriptionEXT;
Members
-
binding
is the binding number for which the divisor is specified. -
divisor
is the number of successive instances that will use the same value of the vertex attribute when instanced rendering is enabled. For example, if the divisor is N, the same vertex attribute will be applied to N successive instances before moving on to the next vertex attribute. The maximum value ofdivisor
is implementation-dependent and can be queried using VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR::maxVertexAttribDivisor
. A value of0
can be used for the divisor if thevertexAttributeInstanceRateZeroDivisor
feature is enabled. In this case, the same vertex attribute will be applied to all instances.
Description
If this structure is not used to define a divisor value for an attribute, then the divisor has a logical default value of 1.
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.