include::meta/VK_EXT_vertex_attribute_divisor.txt[] *Last Modified Date*:: 2018-02-08 *IP Status*:: No known IP claims. *Contributors*:: - Vikram Kushwaha, NVIDIA This extension allows instance-rate vertex attributes to be repeated for certain number of instances instead of advancing for every instance when instanced rendering is enabled. === New Object Types None. === New Enum Constants Extending elink:VkStructureType: ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT ** ename:VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT === New Enums None. === New Structures * Extending slink:VkPipelineVertexInputStateCreateInfo: ** slink:VkPipelineVertexInputDivisorStateCreateInfoEXT * slink:VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT * slink:VkVertexInputBindingDivisorDescriptionEXT === New Functions None. === Issues None. === Examples To create a vertex binding such that the first binding uses instanced rendering and the same attribute is used for every 4 draw instances, an application could use the following set of structures: [source,c++] ---------------------------------------- const VkVertexInputBindingDivisorDescriptionEXT divisorDesc = { 0, 4 }; const VkPipelineVertexInputDivisorStateCreateInfoEXT divisorInfo = { VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT, // sType NULL, // pNext 1, // vertexBindingDivisorCount &divisorDesc // pVertexBindingDivisors } const VkVertexInputBindingDescription binding = { 0, // binding sizeof(Vertex), // stride VK_VERTEX_INPUT_RATE_INSTANCE // inputRate }; const VkPipelineVertexInputStateCreateInfo viInfo = { VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO, // sType &divisorInfo, // pNext ... }; //... ---------------------------------------- === Version History * Revision 1, 2017-12-04 (Vikram Kushwaha) - First Version