Package org.lwjgl.vulkan
Class VkPushConstantsInfoKHR
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkPushConstantsInfoKHR>
org.lwjgl.vulkan.VkPushConstantsInfoKHR
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkPushConstantsInfoKHR
extends org.lwjgl.system.Struct<VkPushConstantsInfoKHR>
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_INFO_KHRpNextmust 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
Layout
struct VkPushConstantsInfoKHR {
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
ConstructorsConstructorDescriptionVkPushConstantsInfoKHR(ByteBuffer container) Creates aVkPushConstantsInfoKHRinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkPushConstantsInfoKHRcalloc()Returns a newVkPushConstantsInfoKHRinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkPushConstantsInfoKHR.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPushConstantsInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPushConstantsInfoKHRcalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkPushConstantsInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPushConstantsInfoKHRcreate()Returns a newVkPushConstantsInfoKHRinstance allocated withBufferUtils.create(int capacity) Returns a newVkPushConstantsInfoKHR.Bufferinstance allocated withBufferUtils.static VkPushConstantsInfoKHRcreate(long address) Returns a newVkPushConstantsInfoKHRinstance for the specified memory address.create(long address, int capacity) Create aVkPushConstantsInfoKHR.Bufferinstance at the specified memory.static VkPushConstantsInfoKHRcreateSafe(long address) createSafe(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 VkPushConstantsInfoKHRmalloc()Returns a newVkPushConstantsInfoKHRinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkPushConstantsInfoKHR.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPushConstantsInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkPushConstantsInfoKHRmalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkPushConstantsInfoKHRinstance 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.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_INFO_KHRvalue 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, 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
-
VkPushConstantsInfoKHR
Creates aVkPushConstantsInfoKHRinstance 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<VkPushConstantsInfoKHR>
-
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_INFO_KHRvalue 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 VkPushConstantsInfoKHR 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 newVkPushConstantsInfoKHRinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkPushConstantsInfoKHRinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkPushConstantsInfoKHRinstance allocated withBufferUtils. -
create
Returns a newVkPushConstantsInfoKHRinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkPushConstantsInfoKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkPushConstantsInfoKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkPushConstantsInfoKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkPushConstantsInfoKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newVkPushConstantsInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkPushConstantsInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkPushConstantsInfoKHR.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPushConstantsInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkPushConstantsInfoKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkPushConstantsInfoKHR.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
-