Class VkAttachmentReference2
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkAttachmentReference2
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkAttachmentReference2KHR
public class VkAttachmentReference2 extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying an attachment reference.Description
Parameters defined by this structure with the same name as those in
VkAttachmentReferencehave the identical effect to those parameters.aspectMaskis ignored when this structure is used to describe anything other than an input attachment reference.If the
separateDepthStencilLayoutsfeature is enabled, andattachmenthas a depth/stencil format,layoutcan be set to a layout that only specifies the layout of the depth aspect.If
layoutonly specifies the layout of the depth aspect of the attachment, the layout of the stencil aspect is specified by thestencilLayoutmember of aVkAttachmentReferenceStencilLayoutstructure included in thepNextchain. Otherwise,layoutdescribes 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
attachmentis notATTACHMENT_UNUSED, and the format of the referenced attachment is a color format,layoutmust not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL - If
attachmentis notATTACHMENT_UNUSED, and the format of the referenced attachment is a depth/stencil format which includes both depth and stencil aspects, andlayoutisIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, thepNextchain must include aVkAttachmentReferenceStencilLayoutstructure - If
attachmentis notATTACHMENT_UNUSED, and the format of the referenced attachment is a depth/stencil format which includes only the depth aspect,layoutmust not beIMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL - If
attachmentis notATTACHMENT_UNUSED, and the format of the referenced attachment is a depth/stencil format which includes only the stencil aspect,layoutmust not beIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
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,VkSubpassDescriptionDepthStencilResolveLayout
struct VkAttachmentReference2 { VkStructureTypesType(); void const *pNext(); uint32_tattachment(); VkImageLayoutlayout(); VkImageAspectFlagsaspectMask(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkAttachmentReference2.BufferAn array ofVkAttachmentReference2structs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intASPECTMASK
ATTACHMENT
LAYOUT
PNEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkAttachmentReference2(java.nio.ByteBuffer container)Creates aVkAttachmentReference2instance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intaspectMask()a mask of which aspect(s) can be accessed within the specified subpass as an input attachment.VkAttachmentReference2aspectMask(int value)Sets the specified value to theaspectMask()field.intattachment()either an integer value identifying an attachment at the corresponding index inVkRenderPassCreateInfo2::pAttachments, orATTACHMENT_UNUSEDto signify that this attachment is not used.VkAttachmentReference2attachment(int value)Sets the specified value to theattachment()field.static VkAttachmentReference2calloc()Returns a newVkAttachmentReference2instance allocated withmemCalloc.static VkAttachmentReference2.Buffercalloc(int capacity)Returns a newVkAttachmentReference2.Bufferinstance allocated withmemCalloc.static VkAttachmentReference2.Buffercalloc(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.static VkAttachmentReference2.Buffercreate(int capacity)Returns a newVkAttachmentReference2.Bufferinstance allocated withBufferUtils.static VkAttachmentReference2create(long address)Returns a newVkAttachmentReference2instance for the specified memory address.static VkAttachmentReference2.Buffercreate(long address, int capacity)Create aVkAttachmentReference2.Bufferinstance at the specified memory.static VkAttachmentReference2createSafe(long address)static VkAttachmentReference2.BuffercreateSafe(long address, int capacity)intlayout()aVkImageLayoutvalue specifying the layout the attachment uses during the subpass.VkAttachmentReference2layout(int value)Sets the specified value to thelayout()field.static VkAttachmentReference2malloc()Returns a newVkAttachmentReference2instance allocated withmemAlloc.static VkAttachmentReference2.Buffermalloc(int capacity)Returns a newVkAttachmentReference2.Bufferinstance allocated withmemAlloc.static VkAttachmentReference2.Buffermalloc(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.VkAttachmentReference2pNext(long value)Sets the specified value to thepNext()field.VkAttachmentReference2pNext(VkAttachmentReferenceStencilLayout value)Prepends the specifiedVkAttachmentReferenceStencilLayoutvalue to thepNextchain.VkAttachmentReference2pNext(VkAttachmentReferenceStencilLayoutKHR value)Prepends the specifiedVkAttachmentReferenceStencilLayoutKHRvalue to thepNextchain.VkAttachmentReference2set(int sType, long pNext, int attachment, int layout, int aspectMask)Initializes this struct with the specified values.VkAttachmentReference2set(VkAttachmentReference2 src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkAttachmentReference2sType(int value)Sets the specified value to thesType()field.VkAttachmentReference2sType$Default()Sets theSTRUCTURE_TYPE_ATTACHMENT_REFERENCE_2value to thesType()field.
-
-
-
Constructor Detail
-
VkAttachmentReference2
public VkAttachmentReference2(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of 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
public VkAttachmentReference2 sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkAttachmentReference2 sType$Default()
Sets theSTRUCTURE_TYPE_ATTACHMENT_REFERENCE_2value to thesType()field.
-
pNext
public VkAttachmentReference2 pNext(long value)
Sets the specified value to thepNext()field.
-
pNext
public VkAttachmentReference2 pNext(VkAttachmentReferenceStencilLayout value)
Prepends the specifiedVkAttachmentReferenceStencilLayoutvalue to thepNextchain.
-
pNext
public VkAttachmentReference2 pNext(VkAttachmentReferenceStencilLayoutKHR value)
Prepends the specifiedVkAttachmentReferenceStencilLayoutKHRvalue to thepNextchain.
-
attachment
public VkAttachmentReference2 attachment(int value)
Sets the specified value to theattachment()field.
-
layout
public VkAttachmentReference2 layout(int value)
Sets the specified value to thelayout()field.
-
aspectMask
public VkAttachmentReference2 aspectMask(int value)
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
public VkAttachmentReference2 set(VkAttachmentReference2 src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkAttachmentReference2 malloc()
Returns a newVkAttachmentReference2instance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkAttachmentReference2 calloc()
Returns a newVkAttachmentReference2instance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkAttachmentReference2 create()
Returns a newVkAttachmentReference2instance allocated withBufferUtils.
-
create
public static VkAttachmentReference2 create(long address)
Returns a newVkAttachmentReference2instance for the specified memory address.
-
createSafe
@Nullable public static VkAttachmentReference2 createSafe(long address)
-
malloc
public static VkAttachmentReference2.Buffer malloc(int capacity)
Returns a newVkAttachmentReference2.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkAttachmentReference2.Buffer calloc(int capacity)
Returns a newVkAttachmentReference2.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkAttachmentReference2.Buffer create(int capacity)
Returns a newVkAttachmentReference2.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkAttachmentReference2.Buffer create(long address, int capacity)
Create aVkAttachmentReference2.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkAttachmentReference2.Buffer createSafe(long address, int capacity)
-
malloc
public static VkAttachmentReference2 malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkAttachmentReference2instance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkAttachmentReference2 calloc(org.lwjgl.system.MemoryStack stack)
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:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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.
-
-