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.NativeResourceStructure specifying a specialization map entry.Description
If a
constantIDvalue 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
constantIDspecialization constant declared in a shader,sizemust match the byte size of theconstantID. If the specialization constant is of typeboolean,sizemust 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 classVkSpecializationMapEntry.BufferAn array ofVkSpecializationMapEntrystructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCONSTANTID
OFFSET
SIZEThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkSpecializationMapEntry(java.nio.ByteBuffer container)Creates aVkSpecializationMapEntryinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkSpecializationMapEntrycalloc()Returns a newVkSpecializationMapEntryinstance allocated withmemCalloc.static VkSpecializationMapEntry.Buffercalloc(int capacity)Returns a newVkSpecializationMapEntry.Bufferinstance allocated withmemCalloc.static VkSpecializationMapEntrycallocStack()Returns a newVkSpecializationMapEntryinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSpecializationMapEntry.BuffercallocStack(int capacity)Returns a newVkSpecializationMapEntry.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSpecializationMapEntry.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSpecializationMapEntry.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSpecializationMapEntrycallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkSpecializationMapEntryinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intconstantID()Returns the value of theconstantIDfield.VkSpecializationMapEntryconstantID(int value)Sets the specified value to theconstantIDfield.static VkSpecializationMapEntrycreate()Returns a newVkSpecializationMapEntryinstance allocated withBufferUtils.static VkSpecializationMapEntry.Buffercreate(int capacity)Returns a newVkSpecializationMapEntry.Bufferinstance allocated withBufferUtils.static VkSpecializationMapEntrycreate(long address)Returns a newVkSpecializationMapEntryinstance for the specified memory address.static VkSpecializationMapEntry.Buffercreate(long address, int capacity)Create aVkSpecializationMapEntry.Bufferinstance at the specified memory.static VkSpecializationMapEntrycreateSafe(long address)static VkSpecializationMapEntry.BuffercreateSafe(long address, int capacity)static VkSpecializationMapEntrymalloc()Returns a newVkSpecializationMapEntryinstance allocated withmemAlloc.static VkSpecializationMapEntry.Buffermalloc(int capacity)Returns a newVkSpecializationMapEntry.Bufferinstance allocated withmemAlloc.static VkSpecializationMapEntrymallocStack()Returns a newVkSpecializationMapEntryinstance allocated on the thread-localMemoryStack.static VkSpecializationMapEntry.BuffermallocStack(int capacity)Returns a newVkSpecializationMapEntry.Bufferinstance allocated on the thread-localMemoryStack.static VkSpecializationMapEntry.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSpecializationMapEntry.Bufferinstance allocated on the specifiedMemoryStack.static VkSpecializationMapEntrymallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkSpecializationMapEntryinstance allocated on the specifiedMemoryStack.static intnconstantID(long struct)Unsafe version ofconstantID().static voidnconstantID(long struct, int value)Unsafe version ofconstantID.static intnoffset(long struct)Unsafe version ofoffset().static voidnoffset(long struct, int value)Unsafe version ofoffset.static longnsize(long struct)Unsafe version ofsize().static voidnsize(long struct, long value)Unsafe version ofsize.intoffset()Returns the value of theoffsetfield.VkSpecializationMapEntryoffset(int value)Sets the specified value to theoffsetfield.VkSpecializationMapEntryset(int constantID, int offset, long size)Initializes this struct with the specified values.VkSpecializationMapEntryset(VkSpecializationMapEntry src)Copies the specified struct data to this struct.longsize()Returns the value of thesizefield.VkSpecializationMapEntrysize(long value)Sets the specified value to thesizefield.intsizeof()
-
-
-
Constructor Detail
-
VkSpecializationMapEntry
public VkSpecializationMapEntry(java.nio.ByteBuffer container)
Creates aVkSpecializationMapEntryinstance 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
constantID
public int constantID()
Returns the value of theconstantIDfield.
-
offset
public int offset()
Returns the value of theoffsetfield.
-
size
public long size()
Returns the value of thesizefield.
-
constantID
public VkSpecializationMapEntry constantID(int value)
Sets the specified value to theconstantIDfield.
-
offset
public VkSpecializationMapEntry offset(int value)
Sets the specified value to theoffsetfield.
-
size
public VkSpecializationMapEntry size(long value)
Sets the specified value to thesizefield.
-
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 newVkSpecializationMapEntryinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkSpecializationMapEntry calloc()
Returns a newVkSpecializationMapEntryinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkSpecializationMapEntry create()
Returns a newVkSpecializationMapEntryinstance allocated withBufferUtils.
-
create
public static VkSpecializationMapEntry create(long address)
Returns a newVkSpecializationMapEntryinstance for the specified memory address.
-
createSafe
@Nullable public static VkSpecializationMapEntry createSafe(long address)
-
malloc
public static VkSpecializationMapEntry.Buffer malloc(int capacity)
Returns a newVkSpecializationMapEntry.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkSpecializationMapEntry.Buffer calloc(int capacity)
Returns a newVkSpecializationMapEntry.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkSpecializationMapEntry.Buffer create(int capacity)
Returns a newVkSpecializationMapEntry.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkSpecializationMapEntry.Buffer create(long address, int capacity)
Create aVkSpecializationMapEntry.Bufferinstance 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 newVkSpecializationMapEntryinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkSpecializationMapEntry callocStack()
Returns a newVkSpecializationMapEntryinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkSpecializationMapEntry mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationMapEntryinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkSpecializationMapEntry callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationMapEntryinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkSpecializationMapEntry.Buffer callocStack(int capacity)
Returns a newVkSpecializationMapEntry.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-