Package org.lwjgl.vulkan
Class VkPushConstantsInfo
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkPushConstantsInfo>
org.lwjgl.vulkan.VkPushConstantsInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkPushConstantsInfoKHR
public class VkPushConstantsInfo
extends org.lwjgl.system.Struct<VkPushConstantsInfo>
implements org.lwjgl.system.NativeResource
Structure specifying a push constant update operation.
Valid Usage
- For each byte in the range specified by
offsetandsizeand for each shader stage instageFlags, there must be a push constant range inlayoutthat includes that byte and that stage - For each byte in the range specified by
offsetandsizeand for each push constant range that overlaps that byte,stageFlagsmust include all stages in that push constant range’sVkPushConstantRange::stageFlags offsetmust be a multiple of 4sizemust be a multiple of 4offsetmust be less thanVkPhysicalDeviceLimits::maxPushConstantsSizesizemust be less than or equal toVkPhysicalDeviceLimits::maxPushConstantsSizeminusoffset
- If the
dynamicPipelineLayoutfeature is not enabled,layoutmust be a validVkPipelineLayouthandle - If
layoutisNULL_HANDLE, thepNextchain must include a validVkPipelineLayoutCreateInfostructure
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_PUSH_CONSTANTS_INFOpNextmust beNULLor a pointer to a valid instance ofVkPipelineLayoutCreateInfo- The
sTypevalue of each struct in thepNextchain must be unique - If
layoutis notNULL_HANDLE,layoutmust be a validVkPipelineLayouthandle stageFlagsmust be a valid combination ofVkShaderStageFlagBitsvaluesstageFlagsmust not be 0pValuesmust be a valid pointer to an array ofsizebytessizemust be greater than 0
See Also
CmdPushConstants2, CmdPushConstants2KHR
Layout
struct VkPushConstantsInfo {
VkStructureType sType();
void const * pNext();
VkPipelineLayout layout();
VkShaderStageFlags stageFlags();
uint32_t offset();
uint32_t size();
void const * pValues();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkPushConstantsInfo(ByteBuffer container) Creates aVkPushConstantsInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkPushConstantsInfocalloc()Returns a newVkPushConstantsInfoinstance allocated withmemCalloc.static VkPushConstantsInfo.Buffercalloc(int capacity) Returns a newVkPushConstantsInfo.Bufferinstance allocated withmemCalloc.static VkPushConstantsInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPushConstantsInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPushConstantsInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkPushConstantsInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPushConstantsInfocreate()Returns a newVkPushConstantsInfoinstance allocated withBufferUtils.static VkPushConstantsInfo.Buffercreate(int capacity) Returns a newVkPushConstantsInfo.Bufferinstance allocated withBufferUtils.static VkPushConstantsInfocreate(long address) Returns a newVkPushConstantsInfoinstance for the specified memory address.static VkPushConstantsInfo.Buffercreate(long address, int capacity) Create aVkPushConstantsInfo.Bufferinstance at the specified memory.static @Nullable VkPushConstantsInfocreateSafe(long address) static @Nullable VkPushConstantsInfo.BuffercreateSafe(long address, int capacity) longlayout()the pipeline layout used to program the push constant updates.layout(long value) Sets the specified value to thelayout()field.static VkPushConstantsInfomalloc()Returns a newVkPushConstantsInfoinstance allocated withmemAlloc.static VkPushConstantsInfo.Buffermalloc(int capacity) Returns a newVkPushConstantsInfo.Bufferinstance allocated withmemAlloc.static VkPushConstantsInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPushConstantsInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkPushConstantsInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkPushConstantsInfoinstance allocated on the specifiedMemoryStack.static longnlayout(long struct) Unsafe version oflayout().static voidnlayout(long struct, long value) Unsafe version oflayout.static intnoffset(long struct) Unsafe version ofoffset().static voidnoffset(long struct, int value) Unsafe version ofoffset.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static ByteBuffernpValues(long struct) Unsafe version ofpValues.static voidnpValues(long struct, ByteBuffer value) Unsafe version ofpValues.static intnsize(long struct) Unsafe version ofsize().static voidnsize(long struct, int value) Sets the specified value to thesizefield of the specifiedstruct.static intnstageFlags(long struct) Unsafe version ofstageFlags().static voidnstageFlags(long struct, int value) Unsafe version ofstageFlags.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.intoffset()the start offset of the push constant range to update, in units of bytes.offset(int value) Sets the specified value to theoffset()field.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.pNext(VkPipelineLayoutCreateInfo value) Prepends the specifiedVkPipelineLayoutCreateInfovalue to thepNextchain.pValues()a pointer to an array ofsizebytes containing the new push constant values.pValues(ByteBuffer value) Sets the address of the specifiedByteBufferto thepValues()field.set(int sType, long pNext, long layout, int stageFlags, int offset, ByteBuffer pValues) Initializes this struct with the specified values.set(VkPushConstantsInfo src) Copies the specified struct data to this struct.intsize()the size of the push constant range to update, in units of bytes.intsizeof()inta bitmask ofVkShaderStageFlagBitsspecifying the shader stages that will use the push constants in the updated range.stageFlags(int value) Sets the specified value to thestageFlags()field.intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_PUSH_CONSTANTS_INFOvalue to thesType()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
LAYOUT
public static final int LAYOUTThe struct member offsets. -
STAGEFLAGS
public static final int STAGEFLAGSThe struct member offsets. -
OFFSET
public static final int OFFSETThe struct member offsets. -
SIZE
public static final int SIZEThe struct member offsets. -
PVALUES
public static final int PVALUESThe struct member offsets.
-
-
Constructor Details
-
VkPushConstantsInfo
Creates aVkPushConstantsInfoinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkPushConstantsInfo>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
layout
public long layout()the pipeline layout used to program the push constant updates. If thedynamicPipelineLayoutfeature is enabled,layoutcan beNULL_HANDLEand the layout must be specified by chainingVkPipelineLayoutCreateInfostructure off thepNext -
stageFlags
public int stageFlags()a bitmask ofVkShaderStageFlagBitsspecifying the shader stages that will use the push constants in the updated range. -
offset
public int offset()the start offset of the push constant range to update, in units of bytes. -
size
public int size()the size of the push constant range to update, in units of bytes. -
pValues
a pointer to an array ofsizebytes containing the new push constant values. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_PUSH_CONSTANTS_INFOvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pNext
Prepends the specifiedVkPipelineLayoutCreateInfovalue to thepNextchain. -
layout
Sets the specified value to thelayout()field. -
stageFlags
Sets the specified value to thestageFlags()field. -
offset
Sets the specified value to theoffset()field. -
pValues
Sets the address of the specifiedByteBufferto thepValues()field. -
set
public VkPushConstantsInfo set(int sType, long pNext, long layout, int stageFlags, int offset, ByteBuffer pValues) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkPushConstantsInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkPushConstantsInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkPushConstantsInfoinstance allocated withBufferUtils. -
create
Returns a newVkPushConstantsInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkPushConstantsInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkPushConstantsInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkPushConstantsInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkPushConstantsInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newVkPushConstantsInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkPushConstantsInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkPushConstantsInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkPushConstantsInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
nlayout
public static long nlayout(long struct) Unsafe version oflayout(). -
nstageFlags
public static int nstageFlags(long struct) Unsafe version ofstageFlags(). -
noffset
public static int noffset(long struct) Unsafe version ofoffset(). -
nsize
public static int nsize(long struct) Unsafe version ofsize(). -
npValues
Unsafe version ofpValues. -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nlayout
public static void nlayout(long struct, long value) Unsafe version oflayout. -
nstageFlags
public static void nstageFlags(long struct, int value) Unsafe version ofstageFlags. -
noffset
public static void noffset(long struct, int value) Unsafe version ofoffset. -
nsize
public static void nsize(long struct, int value) Sets the specified value to thesizefield of the specifiedstruct. -
npValues
Unsafe version ofpValues. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-