VkPushConstantsInfoKHR(3)

# VkPushConstantsInfoKHR(3) Manual Page

## Name

VkPushConstantsInfoKHR - Structure specifying a push constant update operation

Loading… please wait.

## C Specification

The `VkPushConstantsInfoKHR` structure is defined as:

    // Provided by VK_KHR_maintenance6
    typedef struct VkPushConstantsInfoKHR {
        VkStructureType       sType;
        const void*           pNext;
        VkPipelineLayout      layout;
        VkShaderStageFlags    stageFlags;
        uint32_t              offset;
        uint32_t              size;
        const void*           pValues;
    } VkPushConstantsInfoKHR;

## Members

- `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.

## Description

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, `stageFlags` must 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-layout-parameter
  If `layout` is not VK_NULL_HANDLE, `layout` must be a valid VkPipelineLayout handle

- VUID-VkPushConstantsInfoKHR-stageFlags-parameter
  `stageFlags` must be a valid combination of VkShaderStageFlagBits values

- VUID-VkPushConstantsInfoKHR-stageFlags-requiredbitmask
  `stageFlags` must not be `0`

- VUID-VkPushConstantsInfoKHR-pValues-parameter
  `pValues` must be a valid pointer to an array of `size` bytes

- VUID-VkPushConstantsInfoKHR-size-arraylength
  `size` must be greater than `0`

## See Also

VK_KHR_maintenance6, VkPipelineLayout, VkShaderStageFlags, VkStructureType, vkCmdPushConstants2KHR

## 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.

## Copyright

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0