C Specification
Once shader objects have been created, they can be bound to the command buffer using the command:
// Provided by VK_EXT_shader_object
void vkCmdBindShadersEXT(
VkCommandBuffer commandBuffer,
uint32_t stageCount,
const VkShaderStageFlagBits* pStages,
const VkShaderEXT* pShaders);
Parameters
-
commandBuffer
is the command buffer that the shader object will be bound to. -
stageCount
is the length of thepStages
andpShaders
arrays. -
pStages
is a pointer to an array of VkShaderStageFlagBits values specifying one stage per array index that is affected by the corresponding value in thepShaders
array. -
pShaders
is a pointer to an array ofVkShaderEXT
handles and/or VK_NULL_HANDLE values describing the shader binding operations to be performed on each stage inpStages
.
Description
When binding linked shaders, an application may bind them in any
combination of one or more calls to vkCmdBindShadersEXT
(i.e., shaders
that were created linked together do not need to be bound in the same
vkCmdBindShadersEXT
call).
Any shader object bound to a particular stage may be unbound by setting its
value in pShaders
to VK_NULL_HANDLE.
If pShaders
is NULL
, vkCmdBindShadersEXT
behaves as if
pShaders
was an array of stageCount
VK_NULL_HANDLE values
(i.e., any shaders bound to the stages specified in pStages
are
unbound).
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.