Class VkSpecializationInfo

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer


    public class VkSpecializationInfo
    extends Struct
    Khronos Reference Page
    Vulkan Specification

    Contains information about specialization constants.

    Specialization constants are a mechanism whereby constants in a SPIR-V module can have their constant value specified at the time the VkPipeline is created. This allows a SPIR-V module to have constants that can be modified while executing an application that uses the Vulkan API.

    Valid Usage
    • If mapEntryCount is not 0, pMapEntries must be a pointer to an array of mapEntryCount VkSpecializationMapEntry structures
    • If dataSize is not 0, pData must be a pointer to an array of dataSize bytes
    • The offset member of any given element of pMapEntries must be less than dataSize
    • For any given element of pMapEntries, size must be less than or equal to dataSize minus offset

    Member documentation

    • mapEntryCount – the number of entries in the pMapEntries array
    • pMapEntries – a pointer to an array of VkSpecializationMapEntry which maps constant IDs to offsets in pData
    • dataSize – the byte size of the pData buffer
    • pData – contains the actual constant values to specialize with

    Layout

    struct VkSpecializationInfo {
        uint32_t mapEntryCount;
        const VkSpecializationMapEntry * pMapEntries;
        size_t dataSize;
        const void * pData;
    }