Structures

VkPushConstantsInfoKHR

Structure specifying a push constant update operation

The VkPushConstantsInfoKHR structure is defined as:

typedef struct VkPushConstantsInfoKHR {
    VkStructureType sType;
    const void* pNext;
    VkPipelineLayout layout;
    VkShaderStageFlags stageFlags;
    uint32_t offset;
    uint32_t size;
    const void* pValues;
} VkPushConstantsInfoKHR;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure.
  • layout is the pipeline layout used to program the push constant updates. If the dynamicPipelineLayout feature is enabled, layout can be VK_NULL_HANDLE and the layout must be specified by chaining VkPipelineLayoutCreateInfo structure off the pNext
  • stageFlags is a bitmask of VkShaderStageFlagBits specifying the shader stages that will use the push constants in the updated range.
  • offset is the start offset of the push constant range to update, in units of bytes.
  • size is the size of the push constant range to update, in units of bytes.
  • pValues is a pointer to an array of size bytes containing the new push constant values.

Valid Usage

VUID-VkPushConstantsInfoKHR-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-VkPushConstantsInfoKHR-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-VkPushConstantsInfoKHR-offset-00368

offset must be a multiple of 4

VUID-VkPushConstantsInfoKHR-size-00369

size must be a multiple of 4

VUID-VkPushConstantsInfoKHR-offset-00370

offset must be less than VkPhysicalDeviceLimits::maxPushConstantsSize

VUID-VkPushConstantsInfoKHR-size-00371

size must be less than or equal to VkPhysicalDeviceLimits::maxPushConstantsSize minus offset

VUID-VkPushConstantsInfoKHR-None-09495

If the dynamicPipelineLayout feature is not enabled, layout must be a valid VkPipelineLayout handle

VUID-VkPushConstantsInfoKHR-layout-09496

If layout is VK_NULL_HANDLE, the pNext chain must include a valid VkPipelineLayoutCreateInfo structure

Valid Usage (Implicit)

VUID-VkPushConstantsInfoKHR-sType-sType

sType must be VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR

VUID-VkPushConstantsInfoKHR-pNext-pNext

pNext must be NULL or a pointer to a valid instance of VkPipelineLayoutCreateInfo

VUID-VkPushConstantsInfoKHR-sType-unique

The sType value of each struct in the pNext chain must be unique

VUID-VkPushConstantsInfoKHR-stageFlags-parameter

stageFlags must be a valid combination of VkShaderStageFlagBits values

VUID-VkPushConstantsInfoKHR-pValues-parameter

pValues must be a valid pointer to an array of size bytes