Class KHRShaderDrawParameters

  • public final class KHRShaderDrawParameters
    extends java.lang.Object
    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:

    • BaseInstance, which contains the firstInstance parameter passed to draw commands,
    • BaseVertex, which contains the firstVertex/vertexOffset parameter 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 decorations:

    • in int gl_BaseInstanceARB;BaseInstance,
    • in int gl_BaseVertexARB;BaseVertex, and
    • in int gl_DrawIDARB;DrawIndex.
    Promotion to Vulkan 1.1

    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.

    Name String
    Extension Type
    Device extension
    Registered Extension Number
    Extension and Version Dependencies
    • Requires Vulkan 1.0
    Deprecation state
    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
    • Field Detail


        public static final int VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION
        The extension specification version.
        See Also:
        Constant Field Values

        public static final java.lang.String VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME
        The extension name.
        See Also:
        Constant Field Values