C Specification

For pipelines that were created with the support of multiple shader groups (see Graphics Pipeline Shader Groups), the regular vkCmdBindPipeline command will bind Shader Group 0. To explicitly bind a shader group use:

// Provided by VK_NV_device_generated_commands
void vkCmdBindPipelineShaderGroupNV(
    VkCommandBuffer                             commandBuffer,
    VkPipelineBindPoint                         pipelineBindPoint,
    VkPipeline                                  pipeline,
    uint32_t                                    groupIndex);

Parameters

  • commandBuffer is the command buffer that the pipeline will be bound to.

  • pipelineBindPoint is a VkPipelineBindPoint value specifying the bind point to which the pipeline will be bound.

  • pipeline is the pipeline to be bound.

  • groupIndex is the shader group to be bound.

Description

Valid Usage
  • VUID-vkCmdBindPipelineShaderGroupNV-groupIndex-02893
    groupIndex must be 0 or less than the effective VkGraphicsPipelineShaderGroupsCreateInfoNV::groupCount including the referenced pipelines

  • VUID-vkCmdBindPipelineShaderGroupNV-pipelineBindPoint-02894
    The pipelineBindPoint must be VK_PIPELINE_BIND_POINT_GRAPHICS

  • VUID-vkCmdBindPipelineShaderGroupNV-groupIndex-02895
    The same restrictions as vkCmdBindPipeline apply as if the bound pipeline was created only with the Shader Group from the groupIndex information

  • VUID-vkCmdBindPipelineShaderGroupNV-deviceGeneratedCommands-02896
    The deviceGeneratedCommands feature must be enabled

Valid Usage (Implicit)
  • VUID-vkCmdBindPipelineShaderGroupNV-commandBuffer-parameter
    commandBuffer must be a valid VkCommandBuffer handle

  • VUID-vkCmdBindPipelineShaderGroupNV-pipelineBindPoint-parameter
    pipelineBindPoint must be a valid VkPipelineBindPoint value

  • VUID-vkCmdBindPipelineShaderGroupNV-pipeline-parameter
    pipeline must be a valid VkPipeline handle

  • VUID-vkCmdBindPipelineShaderGroupNV-commandBuffer-recording
    commandBuffer must be in the recording state

  • VUID-vkCmdBindPipelineShaderGroupNV-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support graphics, or compute operations

  • VUID-vkCmdBindPipelineShaderGroupNV-videocoding
    This command must only be called outside of a video coding scope

  • VUID-vkCmdBindPipelineShaderGroupNV-commonparent
    Both of commandBuffer, and pipeline must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization
  • Host access to commandBuffer must be externally synchronized

  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type

Primary
Secondary

Both

Outside

Graphics
Compute

State

See Also

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0