VKCMDBINDPIPELINE(3)

NAME
vkCmdBindPipeline - Bind a pipeline object to a command buffer.

C SPECIFICATION

    void vkCmdBindPipeline(
        VkCommandBuffer                             commandBuffer,
        VkPipelineBindPoint                         pipelineBindPoint,
        VkPipeline                                  pipeline);

PARAMETERS

commandBuffer
    The command buffer to which to bind the pipeline.

pipelineBindPoint
    The pipeline bind point on the command buffer to which to bind the pipeline.

pipeline
    The pipeline object to bind to commandBuffer.

DESCRIPTION

vkCmdBindPipeline binds the pipeline object specified in pipeline to the command buffer specified in commandBuffer at the bind point specified by pipelineBindPoint. The value of pipelineBindPoint must be supported by the command buffer, and be valid for the specified pipeline object. pipelineBindPoint may be one of VK_PIPELINE_BIND_POINT_COMPUTE or VK_PIPELINE_BIND_POINT_GRAPHICS, assuming the command buffer supports the corresponding bind point. All work subsequently issued in commandBuffer will use the pipeline bound to the corresponding pipeline bind point.

VALID USAGE

    • commandBuffer must be a valid VkCommandBuffer handle

    • pipelineBindPoint must be a valid VkPipelineBindPoint value

    • pipeline must be a valid VkPipeline handle

    • commandBuffer must be in the recording state

    • The VkCommandPool that commandBuffer was allocated from must support graphics or compute operations

    • Each of commandBuffer and pipeline must have been created, allocated or retrieved from the same VkDevice

    • If pipelineBindPoint is VK_PIPELINE_BIND_POINT_COMPUTE, the VkCommandPool that commandBuffer was allocated from must support compute operations

    • If pipelineBindPoint is VK_PIPELINE_BIND_POINT_GRAPHICS, the VkCommandPool that commandBuffer was allocated from must support graphics operations

    • If pipelineBindPoint is VK_PIPELINE_BIND_POINT_COMPUTE, pipeline must be a compute pipeline

    • If pipelineBindPoint is VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline must be a graphics pipeline

    • If the variable multisample rate feature is not supported, pipeline is a graphics pipeline, the current subpass has no attachments, and this is not the first call to this function with a graphics pipeline after transitioning to the current subpass, then the sample count specified by this pipeline must match that set in the previous pipeline

HOST SYNCHRONIZATION

    • Host access to commandBuffer must be externally synchronized

COMMAND PROPERTIES
Command Buffer Levels | Render Pass Scope | Supported Queue Types
Primary Secondary | Both | GRAPHICS COMPUTE

NOTES

Although vkCmdBindPipeline does not generate errors or return a value, enabled validation layers may detect possible error conditions or potentially undefined behavior and report this via some other means.

SEE ALSO

vkCreateGraphicsPipelines, vkCreateComputePipelines

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.