mirror of
https://github.com/status-im/Vulkan-Docs.git
synced 2025-01-24 05:09:03 +00:00
adadfce8a3
* Update release number to 84. Public Issues: * Fix code sample in the `<<VK_EXT_debug_utils>>` extension (public issue 751). * Fix misleading comment in `vk.xml` for slink:VkDescriptorBufferInfo::pname:buffer (public pull request 762). * Fix formatting of deprecation attributes in schema doc (public pull request 767). * Change `can` to `may` in the description of elink:VkSparseImageFormatFlagBits, which are return values from queries (public pull request 768). * Prettify generated contact list in extension appendices, adding logos and a New Issue link (public pull request 770). * Enable sRGB conversion based on the image view format, not the image format, in the <<textures-format-conversion, Format Conversion>> section (public pull request 773). * Fix typo in equation in the <<primsrast-lines-basic, Basic Line Segment Rasterization>> section (public pull request 780). * Fix special characters in GitHub contacts links (public pull request 783). * Make clean_pdf target remove pdf folder (public pull request 784). * Fix styleguide bad markup of block continuation (public pull request 792). Other Issues: * Allow a zero vertex attribute divisor in the `<<VK_EXT_vertex_attribute_divisor>>` extension, exposed via the slink:VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT feature. * Add missing `structextends="VkDeviceCreateInfo"` to slink:VkPhysicalDeviceShaderDrawParameterFeatures and slink:VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT. New Extensions: * `VK_KHR_memory_model` * `VK_EXT_astc_decode_mode` * `VK_EXT_inline_uniform_block`
108 lines
3.2 KiB
Plaintext
108 lines
3.2 KiB
Plaintext
include::meta/VK_EXT_vertex_attribute_divisor.txt[]
|
|
|
|
*Last Modified Date*::
|
|
2018-08-03
|
|
*IP Status*::
|
|
No known IP claims.
|
|
*Contributors*::
|
|
- Vikram Kushwaha, NVIDIA
|
|
- Jason Ekstrand, Intel
|
|
|
|
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
|
|
* Extending slink:VkPhysicalDeviceFeatures2:
|
|
** slink:VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT
|
|
|
|
=== New Functions
|
|
|
|
None.
|
|
|
|
=== Issues
|
|
|
|
1) What is the effect of a non-zero value for pname:firstInstance?
|
|
|
|
*RESOLVED*: The Vulkan API should follow the OpenGL convention and offset
|
|
attribute fetching by pname:firstInstance while computing vertex attribute
|
|
offsets.
|
|
|
|
2) Should zero be an allowed divisor?
|
|
|
|
*RESOLVED*: Yes.
|
|
A zero divisor means the vertex attribute is repeated for all instances.
|
|
|
|
|
|
=== 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
|
|
* Revision 2, 2018-07-16 (Jason Ekstrand)
|
|
- Adjust the interaction between fname:divisor and pname:firstInstance
|
|
to match the OpenGL convention.
|
|
- Disallow divisors of zero.
|
|
* Revision 3, 2018-08-03 (Vikram Kushwaha)
|
|
- Allow a zero divisor.
|
|
- Add a physical device features structure to query/enable this feature.
|