SPV_KHR_shader_draw_parametersThe extension provides access to three additional built-in shader variables in Vulkan:
BaseInstance, containing the firstInstance parameter passed to drawing commands,BaseVertex, containing the firstVertex or vertexOffset parameter passed to drawing commands, andDrawIndex, containing the index of the draw call currently being processed from an indirect drawing 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; → BaseInstance,in int gl_BaseVertexARB; → BaseVertex, andin int gl_DrawIDARB; → DrawIndex.All functionality in this extension is included in core Vulkan 1.1. However, the shaderDrawParameters feature bit was added to distinguish whether it is actually available or not.
VK_KHR_shader_draw_parametersSPV_KHR_shader_draw_parametersGL_ARB_shader_draw_parameters| Modifier and Type | Field and Description |
|---|---|
| public static final String | VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME
The extension name. |
| public static final int | VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION
The extension specification version. |
| Access | Constructor and Description |
|---|---|
| private |
| VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME | back to summary |
|---|---|
| public static final String VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME The extension name. | |
| VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION | back to summary |
|---|---|
| public static final int VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION The extension specification version. | |
| KHRShaderDrawParameters | back to summary |
|---|---|
| private KHRShaderDrawParameters() | |