To update push constants, call:
// Provided by VK_VERSION_1_0
const void* pValues);
commandBufferis the command buffer in which the push constant update will be recorded.
layoutis the pipeline layout used to program the push constant updates.
stageFlagsis a bitmask of VkShaderStageFlagBits specifying the shader stages that will use the push constants in the updated range.
offsetis the start offset of the push constant range to update, in units of bytes.
sizeis the size of the push constant range to update, in units of bytes.
pValuesis a pointer to an array of
sizebytes containing the new push constant values.
When a command buffer begins recording, all push constant values are undefined.
Push constant values can be updated incrementally, causing shader stages in
stageFlags to read the new data from
pValues for push constants
modified by this command, while still reading the previous data for push
constants not modified by this command.
When a bound pipeline command is issued,
the bound pipeline’s layout must be compatible with the layouts used to set
the values of all push constants in the pipeline layout’s push constant
ranges, as described in Pipeline Layout
Binding a pipeline with a layout that is not compatible with the push
constant layout does not disturb the push constant values.
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.