Movatterモバイル変換


[0]ホーム

URL:


Vulkan API Reference Pageslatest

vkCmdBindShadersEXT(3)

Name

vkCmdBindShadersEXT - Bind shader objects to a command buffer

C Specification

Once shader objects have been created, theycan be bound to the commandbuffer using the command:

// Provided by VK_EXT_shader_objectvoid vkCmdBindShadersEXT(    VkCommandBuffer                             commandBuffer,    uint32_t                                    stageCount,    const VkShaderStageFlagBits*                pStages,    const VkShaderEXT*                          pShaders);

Parameters

  • commandBuffer is the command buffer that the shader object will bebound to.

  • stageCount is the length of thepStages andpShadersarrays.

  • pStages is a pointer to an array ofVkShaderStageFlagBitsvalues specifying one stage per array index that is affected by thecorresponding value in thepShaders array.

  • pShaders is a pointer to an array ofVkShaderEXT handlesand/orVK_NULL_HANDLE values describing the shader bindingoperations to be performed on each stage inpStages.

Description

When binding linked shaders, an applicationmay bind them in anycombination of one or more calls tovkCmdBindShadersEXT (i.e., shadersthat were created linked together do not need to be bound in the samevkCmdBindShadersEXT call).

Any shader object bound to a particular stagemay be unbound by setting itsvalue inpShaders toVK_NULL_HANDLE.IfpShaders isNULL,vkCmdBindShadersEXT behaves as ifpShaders was an array ofstageCountVK_NULL_HANDLE values(i.e., any shaders bound to the stages specified inpStages areunbound).

Valid Usage
Valid Usage (Implicit)
  • VUID-vkCmdBindShadersEXT-commandBuffer-parameter
    commandBuffermust be a validVkCommandBuffer handle

  • VUID-vkCmdBindShadersEXT-pStages-parameter
    pStagesmust be a valid pointer to an array ofstageCount validVkShaderStageFlagBits values

  • VUID-vkCmdBindShadersEXT-pShaders-parameter
    IfpShaders is notNULL,pShadersmust be a valid pointer to an array ofstageCount valid orVK_NULL_HANDLEVkShaderEXT handles

  • VUID-vkCmdBindShadersEXT-commandBuffer-recording
    commandBuffermust be in therecording state

  • VUID-vkCmdBindShadersEXT-commandBuffer-cmdpool
    TheVkCommandPool thatcommandBuffer was allocated frommust supportVK_QUEUE_COMPUTE_BIT, orVK_QUEUE_GRAPHICS_BIT operations

  • VUID-vkCmdBindShadersEXT-videocoding
    This commandmust only be called outside of a video coding scope

  • VUID-vkCmdBindShadersEXT-stageCount-arraylength
    stageCountmust be greater than0

  • VUID-vkCmdBindShadersEXT-commonparent
    Both ofcommandBuffer, and the elements ofpShaders that are valid handles of non-ignored parametersmust have been created, allocated, or retrieved from the sameVkDevice

Host Synchronization
  • Host access tocommandBuffermust be externally synchronized

  • Host access to theVkCommandPool thatcommandBuffer was allocated frommust be externally synchronized

Command Properties
Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type

Primary
Secondary

Both

Outside

VK_QUEUE_COMPUTE_BIT
VK_QUEUE_GRAPHICS_BIT

State

Conditional Rendering

vkCmdBindShadersEXT is not affected byconditional rendering

See Also

Document Notes

For more information, see theVulkan Specification.

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


[8]ページ先頭

©2009-2026 Movatter.jp