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 info.
    Description

    pMapEntries points to a structure of type VkSpecializationMapEntry.

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

    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;
         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()
        Returns the value of the mapEntryCount field.
      • dataSize

        public long dataSize()
        Returns the value of the dataSize field.
      • pData

        @Nullable
        public java.nio.ByteBuffer pData()
        Returns a ByteBuffer view of the data pointed to by the pData field.
      • 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.
      • mallocStack

        public static VkSpecializationInfo mallocStack()
        Returns a new VkSpecializationInfo instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VkSpecializationInfo callocStack()
        Returns a new VkSpecializationInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

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

        public static VkSpecializationInfo callocStack​(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
      • mallocStack

        public static VkSpecializationInfo.Buffer mallocStack​(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
      • callocStack

        public static VkSpecializationInfo.Buffer callocStack​(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
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array