Package org.lwjgl.vulkan
Class VkSpecializationInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkSpecializationInfo
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkSpecializationInfo extends Struct
Khronos Reference Page
Vulkan SpecificationContains 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
VkPipelineis 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
mapEntryCountis not 0,pMapEntriesmust be a pointer to an array ofmapEntryCountVkSpecializationMapEntrystructures - If
dataSizeis not 0,pDatamust be a pointer to an array ofdataSizebytes - The
offsetmember of any given element ofpMapEntriesmust be less thandataSize - For any given element of
pMapEntries,sizemust be less than or equal todataSizeminusoffset
Member documentation
mapEntryCount– the number of entries in thepMapEntriesarraypMapEntries– a pointer to an array ofVkSpecializationMapEntrywhich maps constant IDs to offsets inpDatadataSize– the byte size of thepDatabufferpData– contains the actual constant values to specialize with
Layout
struct VkSpecializationInfo { uint32_t mapEntryCount; const VkSpecializationMapEntry * pMapEntries; size_t dataSize; const void * pData; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkSpecializationInfo.BufferAn array ofVkSpecializationInfostructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkSpecializationInfo(java.nio.ByteBuffer container)Creates aVkSpecializationInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkSpecializationInfocalloc()Returns a newVkSpecializationInfoinstance allocated withmemCalloc.static VkSpecializationInfo.Buffercalloc(int capacity)Returns a newVkSpecializationInfo.Bufferinstance allocated withmemCalloc.static VkSpecializationInfocallocStack()Returns a newVkSpecializationInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSpecializationInfo.BuffercallocStack(int capacity)Returns a newVkSpecializationInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSpecializationInfo.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkSpecializationInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSpecializationInfocallocStack(MemoryStack stack)Returns a newVkSpecializationInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSpecializationInfocreate()Returns a newVkSpecializationInfoinstance allocated withBufferUtils.static VkSpecializationInfo.Buffercreate(int capacity)Returns a newVkSpecializationInfo.Bufferinstance allocated withBufferUtils.static VkSpecializationInfocreate(long address)Returns a newVkSpecializationInfoinstance for the specified memory address ornullif the address isNULL.static VkSpecializationInfo.Buffercreate(long address, int capacity)Create aVkSpecializationInfo.Bufferinstance at the specified memory.longdataSize()Returns the value of thedataSizefield.static VkSpecializationInfomalloc()Returns a newVkSpecializationInfoinstance allocated withmemAlloc.static VkSpecializationInfo.Buffermalloc(int capacity)Returns a newVkSpecializationInfo.Bufferinstance allocated withmemAlloc.static VkSpecializationInfomallocStack()Returns a newVkSpecializationInfoinstance allocated on the thread-localMemoryStack.static VkSpecializationInfo.BuffermallocStack(int capacity)Returns a newVkSpecializationInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkSpecializationInfo.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkSpecializationInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkSpecializationInfomallocStack(MemoryStack stack)Returns a newVkSpecializationInfoinstance allocated on the specifiedMemoryStack.intmapEntryCount()Returns the value of themapEntryCountfield.VkSpecializationInfonset(long struct)Unsafe version ofset.java.nio.ByteBufferpData()Returns aByteBufferview of the data pointed to by thepDatafield.VkSpecializationInfopData(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto thepDatafield.VkSpecializationMapEntry.BufferpMapEntries()Returns aVkSpecializationMapEntry.Bufferview of the struct array pointed to by thepMapEntriesfield.VkSpecializationInfopMapEntries(VkSpecializationMapEntry.Buffer value)Sets the address of the specifiedVkSpecializationMapEntry.Bufferto thepMapEntriesfield.VkSpecializationInfoset(VkSpecializationInfo src)Copies the specified struct data to this struct.VkSpecializationInfoset(VkSpecializationMapEntry.Buffer pMapEntries, java.nio.ByteBuffer pData)Initializes this struct with the specified values.intsizeof()Returns thesizeof(struct).static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)CallsVkSpecializationInfo.validate(long)for each struct contained in the specified struct array.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkSpecializationInfo
public VkSpecializationInfo(java.nio.ByteBuffer container)
Creates aVkSpecializationInfoinstance at the current position of the specifiedByteBuffercontainer. 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()
Description copied from class:StructReturns thesizeof(struct).
-
mapEntryCount
public int mapEntryCount()
Returns the value of themapEntryCountfield.
-
pMapEntries
public VkSpecializationMapEntry.Buffer pMapEntries()
Returns aVkSpecializationMapEntry.Bufferview of the struct array pointed to by thepMapEntriesfield.
-
dataSize
public long dataSize()
Returns the value of thedataSizefield.
-
pData
public java.nio.ByteBuffer pData()
Returns aByteBufferview of the data pointed to by thepDatafield.
-
pMapEntries
public VkSpecializationInfo pMapEntries(VkSpecializationMapEntry.Buffer value)
Sets the address of the specifiedVkSpecializationMapEntry.Bufferto thepMapEntriesfield.
-
pData
public VkSpecializationInfo pData(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto thepDatafield.
-
set
public VkSpecializationInfo set(VkSpecializationMapEntry.Buffer pMapEntries, java.nio.ByteBuffer pData)
Initializes this struct with the specified values.
-
nset
public VkSpecializationInfo nset(long struct)
Unsafe version ofset.
-
set
public VkSpecializationInfo set(VkSpecializationInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkSpecializationInfo malloc()
Returns a newVkSpecializationInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkSpecializationInfo calloc()
Returns a newVkSpecializationInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkSpecializationInfo create()
Returns a newVkSpecializationInfoinstance allocated withBufferUtils.
-
create
public static VkSpecializationInfo create(long address)
Returns a newVkSpecializationInfoinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkSpecializationInfo.Buffer malloc(int capacity)
Returns a newVkSpecializationInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkSpecializationInfo.Buffer calloc(int capacity)
Returns a newVkSpecializationInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkSpecializationInfo.Buffer create(int capacity)
Returns a newVkSpecializationInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkSpecializationInfo.Buffer create(long address, int capacity)
Create aVkSpecializationInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkSpecializationInfo mallocStack()
Returns a newVkSpecializationInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkSpecializationInfo callocStack()
Returns a newVkSpecializationInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkSpecializationInfo mallocStack(MemoryStack stack)
Returns a newVkSpecializationInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkSpecializationInfo callocStack(MemoryStack stack)
Returns a newVkSpecializationInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkSpecializationInfo.Buffer mallocStack(int capacity)
Returns a newVkSpecializationInfo.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkSpecializationInfo.Buffer callocStack(int capacity)
Returns a newVkSpecializationInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkSpecializationInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkSpecializationInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkSpecializationInfo.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkSpecializationInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
validate
public static void validate(long array, int count)CallsVkSpecializationInfo.validate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-