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
,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 typeVkSpecializationMapEntry
.Valid Usage
- The
offset
member of each element ofpMapEntries
must be less thandataSize
- The
size
member of each element ofpMapEntries
must be less than or equal todataSize
minusoffset
Valid Usage (Implicit)
- If
mapEntryCount
is not 0,pMapEntries
must be a valid pointer to an array ofmapEntryCount
validVkSpecializationMapEntry
structures - If
dataSize
is not 0,pData
must be a valid pointer to an array ofdataSize
bytes
See Also
VkPipelineShaderStageCreateInfo
,VkSpecializationMapEntry
Member documentation
mapEntryCount
– the number of entries in thepMapEntries
array.pMapEntries
– a pointer to an array ofVkSpecializationMapEntry
which maps constant IDs to offsets inpData
.dataSize
– the byte size of thepData
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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkSpecializationInfo.Buffer
An array ofVkSpecializationInfo
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DATASIZE
MAPENTRYCOUNT
PDATA
PMAPENTRIESThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor 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 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, org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSpecializationInfo
callocStack(org.lwjgl.system.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.static VkSpecializationInfo.Buffer
create(long address, int capacity)
Create aVkSpecializationInfo.Buffer
instance at the specified memory.static VkSpecializationInfo
createSafe(long address)
static VkSpecializationInfo.Buffer
createSafe(long address, int capacity)
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, org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkSpecializationInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationInfo
instance allocated on the specifiedMemoryStack
.int
mapEntryCount()
Returns the value of themapEntryCount
field.static long
ndataSize(long struct)
Unsafe version ofdataSize()
.static void
ndataSize(long struct, long value)
Sets the specified value to thedataSize
field of the specifiedstruct
.static int
nmapEntryCount(long struct)
Unsafe version ofmapEntryCount()
.static void
nmapEntryCount(long struct, int value)
Sets the specified value to themapEntryCount
field of the specifiedstruct
.static java.nio.ByteBuffer
npData(long struct)
Unsafe version ofpData
.static void
npData(long struct, java.nio.ByteBuffer value)
Unsafe version ofpData
.static VkSpecializationMapEntry.Buffer
npMapEntries(long struct)
Unsafe version ofpMapEntries()
.static void
npMapEntries(long struct, VkSpecializationMapEntry.Buffer value)
Unsafe version ofpMapEntries
.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()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
mapEntryCount
public int mapEntryCount()
Returns the value of themapEntryCount
field.
-
pMapEntries
@Nullable 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
@Nullable public java.nio.ByteBuffer pData()
Returns aByteBuffer
view of the data pointed to by thepData
field.
-
pMapEntries
public VkSpecializationInfo pMapEntries(@Nullable VkSpecializationMapEntry.Buffer value)
Sets the address of the specifiedVkSpecializationMapEntry.Buffer
to thepMapEntries
field.
-
pData
public VkSpecializationInfo pData(@Nullable java.nio.ByteBuffer value)
Sets the address of the specifiedByteBuffer
to thepData
field.
-
set
public VkSpecializationInfo set(@Nullable VkSpecializationMapEntry.Buffer pMapEntries, @Nullable java.nio.ByteBuffer pData)
Initializes this struct with the specified values.
-
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.
-
createSafe
@Nullable public static VkSpecializationInfo createSafe(long address)
-
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
-
createSafe
@Nullable public static VkSpecializationInfo.Buffer createSafe(long address, int 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(org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkSpecializationInfo callocStack(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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
-
nmapEntryCount
public static int nmapEntryCount(long struct)
Unsafe version ofmapEntryCount()
.
-
npMapEntries
@Nullable public static VkSpecializationMapEntry.Buffer npMapEntries(long struct)
Unsafe version ofpMapEntries()
.
-
ndataSize
public static long ndataSize(long struct)
Unsafe version ofdataSize()
.
-
npData
@Nullable public static java.nio.ByteBuffer npData(long struct)
Unsafe version ofpData
.
-
nmapEntryCount
public static void nmapEntryCount(long struct, int value)
Sets the specified value to themapEntryCount
field of the specifiedstruct
.
-
npMapEntries
public static void npMapEntries(long struct, @Nullable VkSpecializationMapEntry.Buffer value)
Unsafe version ofpMapEntries
.
-
ndataSize
public static void ndataSize(long struct, long value)
Sets the specified value to thedataSize
field of the specifiedstruct
.
-
npData
public static void npData(long struct, @Nullable java.nio.ByteBuffer value)
Unsafe version ofpData
.
-
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)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-