mirror of
https://github.com/status-im/Vulkan-Docs.git
synced 2025-02-22 19:18:28 +00:00
* Update release number to 102. Public Issues: * Simplify flink:vkGetImageMemoryRequirements constraint for ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT (public pull request 817). * Fix typo in markup of the <<textures-texel-coordinate-systems-diagrams, Texel Coordinate Systems, Corner Sampling>> image that was generating complaints from chunked HTML output generation (public pull request 928). Internal Issues: * Split the old <<features, Features>> chapter into four chapters: <<features, Features>>, <<limits, Limits>>, <<formats, Formats>>, and <<capabilities, Capabilities>>, with minor edits to the introductory paragraph of each chapter. Anchor names in these chapters were changed, with corresponding effects to xrefs to these anchors elsewhere in spec markup . The purpose is to make the chunked HTML spec output load faster on what was previously a single, gigantic chapter (internal issue 1554). * Add ename:VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV, to the supported pipeline stages for ename:VK_ACCESS_UNIFORM_READ, ename:VK_ACCESS_SHADER_READ, and ename:VK_ACCESS_SHADER_WRITE in the <<synchronization-access-types-supported>> table. * Correct legal name of Google, LLC in vk.xml \<tags> section and a copyright statement. * Clarify that Vulkan treats the Android code:AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM format as RGBA, and the application is responsible for forcing the X/A component to be read as 1.0, in the <<memory-external-android-hardware-buffer-formats>> table. * Clarify the vertex order of various primitive topologies, and define the order of transform feedback vertex capture based on that. This involves a lot of refactoring and cleanup in the <<drawing-primitive-topologies, Primitive Topologies>>, <<geometry-input, Geometry Shader Input Primitives>> sections, and <<vertexpostproc-transform-feedback Transform Feedback>> sections, and numerous places in the <<tessellation>> chapter, New Extensions: * `VK_EXT_metal_surface` * `VK_EXT_ycbcr_image_arrays` (internal issue 1361). * `VK_NVX_image_view_handle`
110 lines
3.3 KiB
Plaintext
110 lines
3.3 KiB
Plaintext
// Copyright (c) 2016-2019 Khronos Group. This work is licensed under a
|
|
// Creative Commons Attribution 4.0 International License; see
|
|
// http://creativecommons.org/licenses/by/4.0/
|
|
|
|
include::meta/VK_KHR_shader_draw_parameters.txt[]
|
|
|
|
*Last Modified Date*::
|
|
2017-09-05
|
|
*IP Status*::
|
|
No known IP claims.
|
|
*Interactions and External Dependencies*::
|
|
- Requires the
|
|
https://www.khronos.org/registry/spir-v/extensions/KHR/SPV_KHR_shader_draw_parameters.html[`SPV_KHR_shader_draw_parameters`]
|
|
SPIR-V extension.
|
|
- Requires
|
|
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_shader_draw_parameters.txt[`GL_ARB_shader_draw_parameters`]
|
|
for GLSL source languages.
|
|
- Promoted to Vulkan 1.1 Core
|
|
*Contributors*::
|
|
- Daniel Koch, NVIDIA Corporation
|
|
- Jeff Bolz, NVIDIA
|
|
- Daniel Rakos, AMD
|
|
- Jan-Harald Fredriksen, ARM
|
|
- John Kessenich, Google
|
|
- Stuart Smith, IMG
|
|
|
|
This extension adds support for the following SPIR-V extension in Vulkan:
|
|
|
|
* `SPV_KHR_shader_draw_parameters`
|
|
|
|
The extension provides access to three additional built-in shader variables
|
|
in Vulkan:
|
|
|
|
* code:BaseInstance, which contains the pname:firstInstance parameter
|
|
passed to draw commands,
|
|
* code:BaseVertex, which contains the pname:firstVertex/pname:vertexOffset
|
|
parameter passed to draw commands, and
|
|
* code:DrawIndex, which contains the index of the draw call currently
|
|
being processed from an indirect draw call.
|
|
|
|
When using GLSL source-based shader languages, the following variables from
|
|
`GL_ARB_shader_draw_parameters` can map to these SPIR-V built-in
|
|
decorations:
|
|
|
|
* `in int gl_BaseInstanceARB;` -> code:BaseInstance,
|
|
* `in int gl_BaseVertexARB;` -> code:BaseVertex, and
|
|
* `in int gl_DrawIDARB;` -> code:DrawIndex.
|
|
|
|
=== New Object Types
|
|
|
|
None.
|
|
|
|
=== New Enum Constants
|
|
|
|
None.
|
|
|
|
=== New Enums
|
|
|
|
None.
|
|
|
|
=== New Structures
|
|
|
|
None.
|
|
|
|
=== New Functions
|
|
|
|
None.
|
|
|
|
=== New Built-In Variables
|
|
|
|
* <<interfaces-builtin-variables-baseinstance,code:BaseInstance>>
|
|
* <<interfaces-builtin-variables-basevertex,code:BaseVertex>>
|
|
* <<interfaces-builtin-variables-drawindex,code:DrawIndex>>
|
|
|
|
=== New SPIR-V Capabilities
|
|
|
|
* <<spirvenv-capabilities,DrawParameters>>
|
|
|
|
=== Promotion to Vulkan 1.1
|
|
|
|
All functionality in this extension is included in core Vulkan 1.1, however
|
|
a <<features-shaderDrawParameters,feature bit was added>> to distinguish
|
|
whether it's actually available or not.
|
|
|
|
=== Issues
|
|
|
|
1) Is this the same functionality as `GL_ARB_shader_draw_parameters`?
|
|
|
|
*RESOLVED*: It's actually a superset as it also adds in support for arrayed
|
|
drawing commands.
|
|
|
|
In GL for `GL_ARB_shader_draw_parameters`, code:gl_BaseVertexARB holds the
|
|
integer value passed to the parameter to the command that resulted in the
|
|
current shader invocation.
|
|
In the case where the command has no code:baseVertex parameter, the value of
|
|
code:gl_BaseVertexARB is zero.
|
|
This means that code:gl_BaseVertexARB = code:baseVertex (for
|
|
code:glDrawElements commands with code:baseVertex) or 0.
|
|
In particular there are no code:glDrawArrays commands that take a
|
|
code:baseVertex parameter.
|
|
|
|
Now in Vulkan, we have code:BaseVertex = pname:vertexOffset (for indexed
|
|
drawing commands) or pname:firstVertex (for arrayed drawing commands), and
|
|
so Vulkan's version is really a superset of GL functionality.
|
|
|
|
=== Version History
|
|
|
|
* Revision 1, 2016-10-05 (Daniel Koch)
|
|
- Internal revisions
|