mirror of
https://github.com/status-im/Vulkan-Docs.git
synced 2025-02-03 10:03:27 +00:00
6377124f37
* Update release number to 81. Public Issues: * Fix missing "`valid`" phrasing in some obscure cases (public pull request 605). * Replace improper use of cannot: referring to the implementation in the description of the <<features-limits-maxUpdateAfterBindDescriptorsInAllPools, pname:maxUpdateAfterBindDescriptorsInAllPools>> limit (public pull request 738). * Reorder description of bits in elink:VkPipelineStageFlagBits and the <<synchronization-pipeline-stages-supported, Supported pipeline stage flags>> table to match their definition order (public pull request 740). * Add description of ename:VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT to elink:VkBufferUsageFlagBits (public pull request 741). * Fix value usage statement for slink:VkSubpassDependency stage mask parameters (public pull request 742). * Fix visible markup in registry schema document (public pull request #745). Internal Issues: * Make the <<geometry-invocations, geometry shader invocation description>> and <<shaders-geometry-execution, Geometry Shader Execution>> descriptions consistent with other pipeline stages (internal issue 1325). * Mark the `VK_NV_glsl_shader` extension as deprecated. * Adjust the per-instance vertex attribute offset formula specified by `VK_EXT_vertex_attribute_divisor` for slink:VkVertexInputBindingDivisorDescriptionEXT so that the interaction between pname:firstInstance and pname:divisor matches the OpenGL convention (internal issue 1333).
104 lines
3.0 KiB
Plaintext
104 lines
3.0 KiB
Plaintext
include::meta/VK_EXT_vertex_attribute_divisor.txt[]
|
|
|
|
*Last Modified Date*::
|
|
2018-07-16
|
|
*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
|
|
|
|
=== 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*: No.
|
|
The zero case in OpenGL is handled in Vulkan by setting the pname:inputRate
|
|
on the binding to ename:VK_VERTEX_INPUT_RATE_VERTEX.
|
|
|
|
|
|
=== 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.
|