Promoted to Vulkan 1.1
- Last Modified Date
- IP Status
No known IP claims.
- Interactions and External Dependencies
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:
The extension provides access to three additional built-in shader variables in Vulkan:
BaseInstance, which contains the
firstInstanceparameter passed to draw commands,
BaseVertex, which contains the
vertexOffsetparameter passed to draw commands, and
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
in int gl_BaseInstanceARB;→
in int gl_BaseVertexARB;→
in int gl_DrawIDARB;→
All functionality in this extension is included in core Vulkan 1.1, however a feature bit was added to distinguish whether it is actually available or not.
1) Is this the same functionality as
RESOLVED: It’s actually a superset as it also adds in support for arrayed drawing commands.
In GL for
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
baseVertex parameter, the value of
gl_BaseVertexARB is zero.
This means that
glDrawElements commands with
baseVertex) or 0.
In particular there are no
glDrawArrays commands that take a
Now in Vulkan, we have
vertexOffset (for indexed
drawing commands) or
firstVertex (for arrayed drawing commands), and
so Vulkan’s version is really a superset of GL functionality.
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.