Package org.lwjgl.vulkan
Class VkSpecializationMapEntry
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkSpecializationMapEntry
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkSpecializationMapEntry extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying a specialization map entry.Description
If a
constantID
value is not a specialization constant ID used in the shader, that map entry does not affect the behavior of the pipeline.Valid Usage
- For a
constantID
specialization constant declared in a shader,size
must match the byte size of theconstantID
. If the specialization constant is of typeboolean
,size
must be the byte size ofVkBool32
See Also
Member documentation
constantID
– the ID of the specialization constant in SPIR-V.offset
– the byte offset of the specialization constant value within the supplied data buffer.size
– the byte size of the specialization constant value within the supplied data buffer.
Layout
struct VkSpecializationMapEntry { uint32_t constantID; uint32_t offset; size_t size; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkSpecializationMapEntry.Buffer
An array ofVkSpecializationMapEntry
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
CONSTANTID
OFFSET
SIZEThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkSpecializationMapEntry(java.nio.ByteBuffer container)
Creates aVkSpecializationMapEntry
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 VkSpecializationMapEntry
calloc()
Returns a newVkSpecializationMapEntry
instance allocated withmemCalloc
.static VkSpecializationMapEntry.Buffer
calloc(int capacity)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated withmemCalloc
.static VkSpecializationMapEntry
callocStack()
Returns a newVkSpecializationMapEntry
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSpecializationMapEntry.Buffer
callocStack(int capacity)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSpecializationMapEntry.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSpecializationMapEntry
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationMapEntry
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
constantID()
Returns the value of theconstantID
field.VkSpecializationMapEntry
constantID(int value)
Sets the specified value to theconstantID
field.static VkSpecializationMapEntry
create()
Returns a newVkSpecializationMapEntry
instance allocated withBufferUtils
.static VkSpecializationMapEntry.Buffer
create(int capacity)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated withBufferUtils
.static VkSpecializationMapEntry
create(long address)
Returns a newVkSpecializationMapEntry
instance for the specified memory address.static VkSpecializationMapEntry.Buffer
create(long address, int capacity)
Create aVkSpecializationMapEntry.Buffer
instance at the specified memory.static VkSpecializationMapEntry
createSafe(long address)
static VkSpecializationMapEntry.Buffer
createSafe(long address, int capacity)
static VkSpecializationMapEntry
malloc()
Returns a newVkSpecializationMapEntry
instance allocated withmemAlloc
.static VkSpecializationMapEntry.Buffer
malloc(int capacity)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated withmemAlloc
.static VkSpecializationMapEntry
mallocStack()
Returns a newVkSpecializationMapEntry
instance allocated on the thread-localMemoryStack
.static VkSpecializationMapEntry.Buffer
mallocStack(int capacity)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated on the thread-localMemoryStack
.static VkSpecializationMapEntry.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated on the specifiedMemoryStack
.static VkSpecializationMapEntry
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationMapEntry
instance allocated on the specifiedMemoryStack
.static int
nconstantID(long struct)
Unsafe version ofconstantID()
.static void
nconstantID(long struct, int value)
Unsafe version ofconstantID
.static int
noffset(long struct)
Unsafe version ofoffset()
.static void
noffset(long struct, int value)
Unsafe version ofoffset
.static long
nsize(long struct)
Unsafe version ofsize()
.static void
nsize(long struct, long value)
Unsafe version ofsize
.int
offset()
Returns the value of theoffset
field.VkSpecializationMapEntry
offset(int value)
Sets the specified value to theoffset
field.VkSpecializationMapEntry
set(int constantID, int offset, long size)
Initializes this struct with the specified values.VkSpecializationMapEntry
set(VkSpecializationMapEntry src)
Copies the specified struct data to this struct.long
size()
Returns the value of thesize
field.VkSpecializationMapEntry
size(long value)
Sets the specified value to thesize
field.int
sizeof()
-
-
-
Constructor Detail
-
VkSpecializationMapEntry
public VkSpecializationMapEntry(java.nio.ByteBuffer container)
Creates aVkSpecializationMapEntry
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
-
constantID
public int constantID()
Returns the value of theconstantID
field.
-
offset
public int offset()
Returns the value of theoffset
field.
-
size
public long size()
Returns the value of thesize
field.
-
constantID
public VkSpecializationMapEntry constantID(int value)
Sets the specified value to theconstantID
field.
-
offset
public VkSpecializationMapEntry offset(int value)
Sets the specified value to theoffset
field.
-
size
public VkSpecializationMapEntry size(long value)
Sets the specified value to thesize
field.
-
set
public VkSpecializationMapEntry set(int constantID, int offset, long size)
Initializes this struct with the specified values.
-
set
public VkSpecializationMapEntry set(VkSpecializationMapEntry src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkSpecializationMapEntry malloc()
Returns a newVkSpecializationMapEntry
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkSpecializationMapEntry calloc()
Returns a newVkSpecializationMapEntry
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkSpecializationMapEntry create()
Returns a newVkSpecializationMapEntry
instance allocated withBufferUtils
.
-
create
public static VkSpecializationMapEntry create(long address)
Returns a newVkSpecializationMapEntry
instance for the specified memory address.
-
createSafe
@Nullable public static VkSpecializationMapEntry createSafe(long address)
-
malloc
public static VkSpecializationMapEntry.Buffer malloc(int capacity)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkSpecializationMapEntry.Buffer calloc(int capacity)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSpecializationMapEntry.Buffer create(int capacity)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSpecializationMapEntry.Buffer create(long address, int capacity)
Create aVkSpecializationMapEntry.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkSpecializationMapEntry.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkSpecializationMapEntry mallocStack()
Returns a newVkSpecializationMapEntry
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkSpecializationMapEntry callocStack()
Returns a newVkSpecializationMapEntry
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkSpecializationMapEntry mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationMapEntry
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkSpecializationMapEntry callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationMapEntry
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkSpecializationMapEntry.Buffer mallocStack(int capacity)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkSpecializationMapEntry.Buffer callocStack(int capacity)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkSpecializationMapEntry.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkSpecializationMapEntry.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationMapEntry.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nconstantID
public static int nconstantID(long struct)
Unsafe version ofconstantID()
.
-
noffset
public static int noffset(long struct)
Unsafe version ofoffset()
.
-
nsize
public static long nsize(long struct)
Unsafe version ofsize()
.
-
nconstantID
public static void nconstantID(long struct, int value)
Unsafe version ofconstantID
.
-
noffset
public static void noffset(long struct, int value)
Unsafe version ofoffset
.
-
nsize
public static void nsize(long struct, long value)
Unsafe version ofsize
.
-
-