Structures

VkSpecializationInfo

Structure specifying specialization information

The VkSpecializationInfo structure is defined as:

typedef struct VkSpecializationInfo {
    uint32_t mapEntryCount;
    const VkSpecializationMapEntry* pMapEntries;
    size_t dataSize;
    const void* pData;
} VkSpecializationInfo;
  • mapEntryCount is the number of entries in the pMapEntries array.
  • pMapEntries is a pointer to an array of VkSpecializationMapEntry structures, which map constant IDs to offsets in pData.
  • dataSize is the byte size of the pData buffer.
  • pData contains the actual constant values to specialize with.

Valid Usage

VUID-VkSpecializationInfo-offset-00773

The offset member of each element of pMapEntries must be less than dataSize

VUID-VkSpecializationInfo-pMapEntries-00774

The size member of each element of pMapEntries must be less than or equal to dataSize minus offset

VUID-VkSpecializationInfo-constantID-04911

The constantID value of each element of pMapEntries must be unique within pMapEntries

Valid Usage (Implicit)

VUID-VkSpecializationInfo-pMapEntries-parameter

If mapEntryCount is not 0, pMapEntries must be a valid pointer to an array of mapEntryCount valid VkSpecializationMapEntry structures

VUID-VkSpecializationInfo-pData-parameter

If dataSize is not 0, pData must be a valid pointer to an array of dataSize bytes