Function Prototype
vkCmdSetBlendConstants
Set the values of blend constants
primary / secondary
both
graphics
state
To dynamically set and change the blend constants, call:
void vkCmdSetBlendConstants(
VkCommandBuffer commandBuffer,
const float blendConstants[4]);
commandBufferis the command buffer into which the command will be recorded.blendConstantsis a pointer to an array of four values specifying the Rc, Gc, Bc, and Ac components of the blend constant color used in blending, depending on the blend factor.
This command sets blend constants for subsequent drawing commands when
when drawing using shader objects, or
the graphics pipeline is created with VK_DYNAMIC_STATE_BLEND_CONSTANTS
set in VkPipelineDynamicStateCreateInfo::pDynamicStates.
Otherwise, this state is specified by the
VkPipelineColorBlendStateCreateInfo::blendConstants values used
to create the currently active pipeline.
Valid Usage (Implicit)
VUID-vkCmdSetBlendConstants-commandBuffer-parameter
commandBuffer must be a valid VkCommandBuffer handle
VUID-vkCmdSetBlendConstants-commandBuffer-recording
commandBuffer must be in the recording state
VUID-vkCmdSetBlendConstants-commandBuffer-cmdpool
The VkCommandPool that commandBuffer was allocated from must support graphics operations
VUID-vkCmdSetBlendConstants-videocoding
This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized ::