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
Layout
struct VkSpecializationMapEntry { uint32_tconstantID(); uint32_toffset(); size_tsize(); }
-
-
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 Deprecated 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 VkSpecializationMapEntry.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSpecializationMapEntry.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSpecializationMapEntrycalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkSpecializationMapEntryinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSpecializationMapEntrycallocStack()Deprecated.static VkSpecializationMapEntry.BuffercallocStack(int capacity)Deprecated.static VkSpecializationMapEntry.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkSpecializationMapEntrycallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.intconstantID()the ID of the specialization constant in SPIR-V.VkSpecializationMapEntryconstantID(int value)Sets the specified value to theconstantID()field.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 VkSpecializationMapEntry.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSpecializationMapEntry.Bufferinstance allocated on the specifiedMemoryStack.static VkSpecializationMapEntrymalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkSpecializationMapEntryinstance allocated on the specifiedMemoryStack.static VkSpecializationMapEntrymallocStack()Deprecated.static VkSpecializationMapEntry.BuffermallocStack(int capacity)Deprecated.static VkSpecializationMapEntry.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkSpecializationMapEntrymallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()the byte offset of the specialization constant value within the supplied data buffer.VkSpecializationMapEntryoffset(int value)Sets the specified value to theoffset()field.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()the byte size of the specialization constant value within the supplied data buffer.VkSpecializationMapEntrysize(long value)Sets the specified value to thesize()field.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()
the ID of the specialization constant in SPIR-V.
-
offset
public int offset()
the byte offset of the specialization constant value within the supplied data buffer.
-
size
public long size()
the byte size of the specialization constant value within the supplied data buffer.
-
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 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
@Deprecated public static VkSpecializationMapEntry mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkSpecializationMapEntry callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkSpecializationMapEntry mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkSpecializationMapEntry callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkSpecializationMapEntry.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkSpecializationMapEntry.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkSpecializationMapEntry.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkSpecializationMapEntry.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkSpecializationMapEntry malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkSpecializationMapEntryinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkSpecializationMapEntry calloc(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
-
malloc
public static VkSpecializationMapEntry.Buffer malloc(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
-
calloc
public static VkSpecializationMapEntry.Buffer calloc(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.
-
-