Function Prototype

vkCmdBindPipelineShaderGroupNV

Bind a pipeline object's shader group to a command buffer
primary / secondary
both
graphics / compute
state

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:

void vkCmdBindPipelineShaderGroupNV(
    VkCommandBuffer commandBuffer,
    VkPipelineBindPoint pipelineBindPoint,
    VkPipeline pipeline,
    uint32_t groupIndex);
  • 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.

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

Valid Usage (Implicit)

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 ::