Class VkAttachmentReference2
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkAttachmentReference2KHR
Description
Parameters defined by this structure with the same name as those in VkAttachmentReference have the identical effect to those parameters.
aspectMask is ignored when this structure is used to describe anything other than an input attachment reference.
If the separateDepthStencilLayouts feature is enabled, and attachment has a depth/stencil format, layout can be set to a layout that only specifies the layout of the depth aspect.
If layout only specifies the layout of the depth aspect of the attachment, the layout of the stencil aspect is specified by the stencilLayout member of a VkAttachmentReferenceStencilLayout structure included in the pNext chain. Otherwise, layout describes the layout for all relevant image aspects.
Valid Usage
- If
attachmentis notATTACHMENT_UNUSED,layoutmust not beIMAGE_LAYOUT_UNDEFINED,IMAGE_LAYOUT_PREINITIALIZED, orIMAGE_LAYOUT_PRESENT_SRC_KHR - If the
separateDepthStencilLayoutsfeature is not enabled, andattachmentis notATTACHMENT_UNUSED,layoutmust not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, orIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, - If the
synchronization2feature is not enabled,layoutmust not beIMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHRorIMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR - If the
attachmentFeedbackLoopLayoutfeature is not enabled,layoutmust not beIMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT - If the
dynamicRenderingLocalReadfeature is not enabled,layoutmust not beIMAGE_LAYOUT_RENDERING_LOCAL_READ
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_ATTACHMENT_REFERENCE_2pNextmust beNULLor a pointer to a valid instance ofVkAttachmentReferenceStencilLayout- The
sTypevalue of each struct in thepNextchain must be unique layoutmust be a validVkImageLayoutvalue
See Also
VkFragmentShadingRateAttachmentInfoKHR, VkSubpassDescription2, VkSubpassDescriptionDepthStencilResolve
Layout
struct VkAttachmentReference2 {
VkStructureType sType();
void const * pNext();
uint32_t attachment();
VkImageLayout layout();
VkImageAspectFlags aspectMask();
}-
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 size in bytes.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
ConstructorsConstructorDescriptionVkAttachmentReference2(ByteBuffer container) Creates aVkAttachmentReference2instance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptioninta mask of which aspect(s) can be accessed within the specified subpass as an input attachment.aspectMask(int value) Sets the specified value to theaspectMask()field.inteither an integer value identifying an attachment at the corresponding index inVkRenderPassCreateInfo2::pAttachments, orATTACHMENT_UNUSEDto signify that this attachment is not used.attachment(int value) Sets the specified value to theattachment()field.static VkAttachmentReference2calloc()Returns a newVkAttachmentReference2instance allocated withmemCalloc.calloc(int capacity) Returns a newVkAttachmentReference2.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkAttachmentReference2.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAttachmentReference2calloc(org.lwjgl.system.MemoryStack stack) Returns a newVkAttachmentReference2instance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAttachmentReference2create()Returns a newVkAttachmentReference2instance allocated withBufferUtils.create(int capacity) Returns a newVkAttachmentReference2.Bufferinstance allocated withBufferUtils.static VkAttachmentReference2create(long address) Returns a newVkAttachmentReference2instance for the specified memory address.create(long address, int capacity) Create aVkAttachmentReference2.Bufferinstance at the specified memory.static @Nullable VkAttachmentReference2createSafe(long address) static @Nullable VkAttachmentReference2.BuffercreateSafe(long address, int capacity) intlayout()aVkImageLayoutvalue specifying the layout the attachment uses during the subpass.layout(int value) Sets the specified value to thelayout()field.static VkAttachmentReference2malloc()Returns a newVkAttachmentReference2instance allocated withmemAlloc.malloc(int capacity) Returns a newVkAttachmentReference2.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkAttachmentReference2.Bufferinstance allocated on the specifiedMemoryStack.static VkAttachmentReference2malloc(org.lwjgl.system.MemoryStack stack) Returns a newVkAttachmentReference2instance allocated on the specifiedMemoryStack.static intnaspectMask(long struct) Unsafe version ofaspectMask().static voidnaspectMask(long struct, int value) Unsafe version ofaspectMask.static intnattachment(long struct) Unsafe version ofattachment().static voidnattachment(long struct, int value) Unsafe version ofattachment.static intnlayout(long struct) Unsafe version oflayout().static voidnlayout(long struct, int value) Unsafe version oflayout.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.Prepends the specifiedVkAttachmentReferenceStencilLayoutvalue to thepNextchain.Prepends the specifiedVkAttachmentReferenceStencilLayoutKHRvalue to thepNextchain.set(int sType, long pNext, int attachment, int layout, int aspectMask) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_ATTACHMENT_REFERENCE_2value to thesType()field.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. -
ATTACHMENT
public static final int ATTACHMENTThe struct member offsets. -
LAYOUT
public static final int LAYOUTThe struct member offsets. -
ASPECTMASK
public static final int ASPECTMASKThe struct member offsets.
-
-
Constructor Details
-
VkAttachmentReference2
Creates aVkAttachmentReference2instance 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<VkAttachmentReference2>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
attachment
public int attachment()either an integer value identifying an attachment at the corresponding index inVkRenderPassCreateInfo2::pAttachments, orATTACHMENT_UNUSEDto signify that this attachment is not used. -
layout
public int layout()aVkImageLayoutvalue specifying the layout the attachment uses during the subpass. -
aspectMask
public int aspectMask()a mask of which aspect(s) can be accessed within the specified subpass as an input attachment. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_ATTACHMENT_REFERENCE_2value to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pNext
Prepends the specifiedVkAttachmentReferenceStencilLayoutvalue to thepNextchain. -
pNext
Prepends the specifiedVkAttachmentReferenceStencilLayoutKHRvalue to thepNextchain. -
attachment
Sets the specified value to theattachment()field. -
layout
Sets the specified value to thelayout()field. -
aspectMask
Sets the specified value to theaspectMask()field. -
set
public VkAttachmentReference2 set(int sType, long pNext, int attachment, int layout, int aspectMask) 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 newVkAttachmentReference2instance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkAttachmentReference2instance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkAttachmentReference2instance allocated withBufferUtils. -
create
Returns a newVkAttachmentReference2instance for the specified memory address. -
createSafe
-
malloc
Returns a newVkAttachmentReference2.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkAttachmentReference2.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkAttachmentReference2.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkAttachmentReference2.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newVkAttachmentReference2instance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkAttachmentReference2instance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkAttachmentReference2.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkAttachmentReference2.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkAttachmentReference2.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkAttachmentReference2.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(). -
nattachment
public static int nattachment(long struct) Unsafe version ofattachment(). -
nlayout
public static int nlayout(long struct) Unsafe version oflayout(). -
naspectMask
public static int naspectMask(long struct) Unsafe version ofaspectMask(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nattachment
public static void nattachment(long struct, int value) Unsafe version ofattachment. -
nlayout
public static void nlayout(long struct, int value) Unsafe version oflayout. -
naspectMask
public static void naspectMask(long struct, int value) Unsafe version ofaspectMask.
-