VkPushConstantsInfo
The VkPushConstantsInfo structure is defined as:
typedef struct VkPushConstantsInfo {
VkStructureType sType;
const void* pNext;
VkPipelineLayout layout;
VkShaderStageFlags stageFlags;
uint32_t offset;
uint32_t size;
const void* pValues;
} VkPushConstantsInfo;
or the equivalent
typedef VkPushConstantsInfo VkPushConstantsInfoKHR;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.layoutis the pipeline layout used to program the push constant updates. If thedynamicPipelineLayoutfeature is enabled,layoutcan be VK_NULL_HANDLE and the layout must be specified by chaining VkPipelineLayoutCreateInfo structure off thepNextstageFlagsis 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 ofsizebytes containing the new push constant values.
Valid Usage
VUID-VkPushConstantsInfo-offset-01795
For each byte in the range specified by offset and size and
for each shader stage in stageFlags, there must be a push
constant range in layout that includes that byte and that stage
VUID-VkPushConstantsInfo-offset-01796
For each byte in the range specified by offset and size and
for each push constant range that overlaps that byte, stageFlagsmust include all stages in that push constant range’s
VkPushConstantRange::stageFlags
VUID-VkPushConstantsInfo-offset-00368
offset must be a multiple of 4
VUID-VkPushConstantsInfo-size-00369
size must be a multiple of 4
VUID-VkPushConstantsInfo-offset-00370
offset must be less than
VkPhysicalDeviceLimits::maxPushConstantsSize
VUID-VkPushConstantsInfo-size-00371
size must be less than or equal to
VkPhysicalDeviceLimits::maxPushConstantsSize minus
offset
VUID-VkPushConstantsInfo-None-09495
If the dynamicPipelineLayout
feature is not enabled,
layout must be a valid VkPipelineLayout handle
VUID-VkPushConstantsInfo-layout-09496
If layout is VK_NULL_HANDLE, the pNext chain must
include a valid VkPipelineLayoutCreateInfo structure
Valid Usage (Implicit)
VUID-VkPushConstantsInfo-sType-sType
sType must be VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO
VUID-VkPushConstantsInfo-pNext-pNext
pNext must be NULL or a pointer to a valid instance of VkPipelineLayoutCreateInfo
VUID-VkPushConstantsInfo-sType-unique
The sType value of each structure in the pNext chain must be unique
VUID-VkPushConstantsInfo-layout-parameter
If layout is not VK_NULL_HANDLE, layout must be a valid VkPipelineLayout handle
VUID-VkPushConstantsInfo-stageFlags-parameter
stageFlags must be a valid combination of VkShaderStageFlagBits values
VUID-VkPushConstantsInfo-stageFlags-requiredbitmask
stageFlags must not be 0
VUID-VkPushConstantsInfo-pValues-parameter
pValues must be a valid pointer to an array of size bytes
VUID-VkPushConstantsInfo-size-arraylength
size must be greater than 0