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
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 ofmapEntryCount
VkSpecializationMapEntry
structures - If
dataSize
is not 0,pData
must be a pointer to an array ofdataSize
bytes - The
offset
member of any given element ofpMapEntries
must be less thandataSize
- For any given element of
pMapEntries
,size
must be less than or equal todataSize
minusoffset
Member documentation
mapEntryCount
– the number of entries in thepMapEntries
arraypMapEntries
– a pointer to an array ofVkSpecializationMapEntry
which maps constant IDs to offsets inpData
dataSize
– the byte size of thepData
bufferpData
– 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 class
VkSpecializationInfo.Buffer
An array ofVkSpecializationInfo
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 aVkSpecializationInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkSpecializationInfo
calloc()
Returns a newVkSpecializationInfo
instance allocated withmemCalloc
.static VkSpecializationInfo.Buffer
calloc(int capacity)
Returns a newVkSpecializationInfo.Buffer
instance allocated withmemCalloc
.static VkSpecializationInfo
callocStack()
Returns a newVkSpecializationInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSpecializationInfo.Buffer
callocStack(int capacity)
Returns a newVkSpecializationInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSpecializationInfo.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkSpecializationInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSpecializationInfo
callocStack(MemoryStack stack)
Returns a newVkSpecializationInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSpecializationInfo
create()
Returns a newVkSpecializationInfo
instance allocated withBufferUtils
.static VkSpecializationInfo.Buffer
create(int capacity)
Returns a newVkSpecializationInfo.Buffer
instance allocated withBufferUtils
.static VkSpecializationInfo
create(long address)
Returns a newVkSpecializationInfo
instance for the specified memory address ornull
if the address isNULL
.static VkSpecializationInfo.Buffer
create(long address, int capacity)
Create aVkSpecializationInfo.Buffer
instance at the specified memory.long
dataSize()
Returns the value of thedataSize
field.static VkSpecializationInfo
malloc()
Returns a newVkSpecializationInfo
instance allocated withmemAlloc
.static VkSpecializationInfo.Buffer
malloc(int capacity)
Returns a newVkSpecializationInfo.Buffer
instance allocated withmemAlloc
.static VkSpecializationInfo
mallocStack()
Returns a newVkSpecializationInfo
instance allocated on the thread-localMemoryStack
.static VkSpecializationInfo.Buffer
mallocStack(int capacity)
Returns a newVkSpecializationInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkSpecializationInfo.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkSpecializationInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkSpecializationInfo
mallocStack(MemoryStack stack)
Returns a newVkSpecializationInfo
instance allocated on the specifiedMemoryStack
.int
mapEntryCount()
Returns the value of themapEntryCount
field.VkSpecializationInfo
nset(long struct)
Unsafe version ofset
.java.nio.ByteBuffer
pData()
Returns aByteBuffer
view of the data pointed to by thepData
field.VkSpecializationInfo
pData(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thepData
field.VkSpecializationMapEntry.Buffer
pMapEntries()
Returns aVkSpecializationMapEntry.Buffer
view of the struct array pointed to by thepMapEntries
field.VkSpecializationInfo
pMapEntries(VkSpecializationMapEntry.Buffer value)
Sets the address of the specifiedVkSpecializationMapEntry.Buffer
to thepMapEntries
field.VkSpecializationInfo
set(VkSpecializationInfo src)
Copies the specified struct data to this struct.VkSpecializationInfo
set(VkSpecializationMapEntry.Buffer pMapEntries, java.nio.ByteBuffer pData)
Initializes this struct with the specified values.int
sizeof()
Returns thesizeof(struct)
.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(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 aVkSpecializationInfo
instance at the current position of the specifiedByteBuffer
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()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
mapEntryCount
public int mapEntryCount()
Returns the value of themapEntryCount
field.
-
pMapEntries
public VkSpecializationMapEntry.Buffer pMapEntries()
Returns aVkSpecializationMapEntry.Buffer
view of the struct array pointed to by thepMapEntries
field.
-
dataSize
public long dataSize()
Returns the value of thedataSize
field.
-
pData
public java.nio.ByteBuffer pData()
Returns aByteBuffer
view of the data pointed to by thepData
field.
-
pMapEntries
public VkSpecializationInfo pMapEntries(VkSpecializationMapEntry.Buffer value)
Sets the address of the specifiedVkSpecializationMapEntry.Buffer
to thepMapEntries
field.
-
pData
public VkSpecializationInfo pData(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thepData
field.
-
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 newVkSpecializationInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkSpecializationInfo calloc()
Returns a newVkSpecializationInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkSpecializationInfo create()
Returns a newVkSpecializationInfo
instance allocated withBufferUtils
.
-
create
public static VkSpecializationInfo create(long address)
Returns a newVkSpecializationInfo
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkSpecializationInfo.Buffer malloc(int capacity)
Returns a newVkSpecializationInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkSpecializationInfo.Buffer calloc(int capacity)
Returns a newVkSpecializationInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSpecializationInfo.Buffer create(int capacity)
Returns a newVkSpecializationInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSpecializationInfo.Buffer create(long address, int capacity)
Create aVkSpecializationInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkSpecializationInfo mallocStack()
Returns a newVkSpecializationInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkSpecializationInfo callocStack()
Returns a newVkSpecializationInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkSpecializationInfo mallocStack(MemoryStack stack)
Returns a newVkSpecializationInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkSpecializationInfo callocStack(MemoryStack stack)
Returns a newVkSpecializationInfo
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkSpecializationInfo.Buffer callocStack(int capacity)
Returns a newVkSpecializationInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkSpecializationInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkSpecializationInfo.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
-
-