Class VkSpecializationInfo

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

    public class VkSpecializationInfo
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying specialization information.
    Valid Usage
    • The offset member of each element of pMapEntries must be less than dataSize
    • The size member of each element of pMapEntries must be less than or equal to dataSize minus offset
    • The constantID value of each element of pMapEntries must be unique within pMapEntries
    Valid Usage (Implicit)
    • If mapEntryCount is not 0, pMapEntries must be a valid pointer to an array of mapEntryCount valid VkSpecializationMapEntry structures
    • If dataSize is not 0, pData must be a valid pointer to an array of dataSize bytes
    See Also

    VkPipelineShaderStageCreateInfo, VkSpecializationMapEntry

    Layout

    
     struct VkSpecializationInfo {
         uint32_t mapEntryCount();
         VkSpecializationMapEntry const * pMapEntries();
         size_t dataSize();
         void const * pData();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MAPENTRYCOUNT, PMAPENTRIES, DATASIZE, PDATA

        The struct member offsets.
    • Constructor Detail

      • VkSpecializationInfo

        public VkSpecializationInfo​(java.nio.ByteBuffer container)
        Creates a VkSpecializationInfo instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • mapEntryCount

        public int mapEntryCount()
        the number of entries in the pMapEntries array.
      • dataSize

        public long dataSize()
        the byte size of the pData buffer.
      • pData

        @Nullable
        public java.nio.ByteBuffer pData()
        contains the actual constant values to specialize with.
      • pData

        public VkSpecializationInfo pData​(@Nullable
                                          java.nio.ByteBuffer value)
        Sets the address of the specified ByteBuffer to the pData() field.
      • malloc

        public static VkSpecializationInfo malloc()
        Returns a new VkSpecializationInfo instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static VkSpecializationInfo calloc()
        Returns a new VkSpecializationInfo instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static VkSpecializationInfo create()
        Returns a new VkSpecializationInfo instance allocated with BufferUtils.
      • create

        public static VkSpecializationInfo create​(long address)
        Returns a new VkSpecializationInfo instance for the specified memory address.
      • createSafe

        @Nullable
        public static VkSpecializationInfo createSafe​(long address)
        Like create, but returns null if address is NULL.
      • malloc

        public static VkSpecializationInfo malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkSpecializationInfo instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static VkSpecializationInfo calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkSpecializationInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • malloc

        public static VkSpecializationInfo.Buffer malloc​(int capacity,
                                                         org.lwjgl.system.MemoryStack stack)
        Returns a new VkSpecializationInfo.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static VkSpecializationInfo.Buffer calloc​(int capacity,
                                                         org.lwjgl.system.MemoryStack stack)
        Returns a new VkSpecializationInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nmapEntryCount

        public static int nmapEntryCount​(long struct)
        Unsafe version of mapEntryCount().
      • ndataSize

        public static long ndataSize​(long struct)
        Unsafe version of dataSize().
      • npData

        @Nullable
        public static java.nio.ByteBuffer npData​(long struct)
        Unsafe version of pData.
      • nmapEntryCount

        public static void nmapEntryCount​(long struct,
                                          int value)
        Sets the specified value to the mapEntryCount field of the specified struct.
      • ndataSize

        public static void ndataSize​(long struct,
                                     long value)
        Sets the specified value to the dataSize field of the specified struct.
      • npData

        public static void npData​(long struct,
                                  @Nullable
                                  java.nio.ByteBuffer value)
        Unsafe version of pData.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate