Class VkAttachmentReference2

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkAttachmentReference2>
org.lwjgl.vulkan.VkAttachmentReference2
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
Direct Known Subclasses:
VkAttachmentReference2KHR

public class VkAttachmentReference2 extends org.lwjgl.system.Struct<VkAttachmentReference2> implements org.lwjgl.system.NativeResource
Structure specifying an attachment reference.
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
Valid Usage (Implicit)
See Also

VkFragmentShadingRateAttachmentInfoKHR, VkSubpassDescription2, VkSubpassDescriptionDepthStencilResolve

Layout


 struct VkAttachmentReference2 {
     VkStructureType sType();
     void const * pNext();
     uint32_t attachment();
     VkImageLayout layout();
     VkImageAspectFlags aspectMask();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • STYPE

      public static final int STYPE
      The struct member offsets.
    • PNEXT

      public static final int PNEXT
      The struct member offsets.
    • ATTACHMENT

      public static final int ATTACHMENT
      The struct member offsets.
    • LAYOUT

      public static final int LAYOUT
      The struct member offsets.
    • ASPECTMASK

      public static final int ASPECTMASK
      The struct member offsets.
  • Constructor Details

    • VkAttachmentReference2

      public VkAttachmentReference2(ByteBuffer container)
      Creates a VkAttachmentReference2 instance at the current position of the specified ByteBuffer container. 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:
      sizeof in class org.lwjgl.system.Struct<VkAttachmentReference2>
    • sType

      public int sType()
      a VkStructureType value identifying this structure.
    • pNext

      public long pNext()
      NULL or a pointer to a structure extending this structure.
    • attachment

      public int attachment()
      either an integer value identifying an attachment at the corresponding index in VkRenderPassCreateInfo2::pAttachments, or ATTACHMENT_UNUSED to signify that this attachment is not used.
    • layout

      public int layout()
      a VkImageLayout value 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 the sType() field.
    • sType$Default

      public VkAttachmentReference2 sType$Default()
      Sets the STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2 value to the sType() field.
    • pNext

      public VkAttachmentReference2 pNext(long value)
      Sets the specified value to the pNext() field.
    • pNext

      Prepends the specified VkAttachmentReferenceStencilLayout value to the pNext chain.
    • pNext

      Prepends the specified VkAttachmentReferenceStencilLayoutKHR value to the pNext chain.
    • attachment

      public VkAttachmentReference2 attachment(int value)
      Sets the specified value to the attachment() field.
    • layout

      public VkAttachmentReference2 layout(int value)
      Sets the specified value to the layout() field.
    • aspectMask

      public VkAttachmentReference2 aspectMask(int value)
      Sets the specified value to the aspectMask() 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

      public static VkAttachmentReference2 malloc()
      Returns a new VkAttachmentReference2 instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static VkAttachmentReference2 calloc()
      Returns a new VkAttachmentReference2 instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static VkAttachmentReference2 create()
      Returns a new VkAttachmentReference2 instance allocated with BufferUtils.
    • create

      public static VkAttachmentReference2 create(long address)
      Returns a new VkAttachmentReference2 instance for the specified memory address.
    • createSafe

      public static @Nullable VkAttachmentReference2 createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkAttachmentReference2.Buffer malloc(int capacity)
      Returns a new VkAttachmentReference2.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VkAttachmentReference2.Buffer calloc(int capacity)
      Returns a new VkAttachmentReference2.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkAttachmentReference2.Buffer create(int capacity)
      Returns a new VkAttachmentReference2.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkAttachmentReference2.Buffer create(long address, int capacity)
      Create a VkAttachmentReference2.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable VkAttachmentReference2.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkAttachmentReference2 malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkAttachmentReference2 instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VkAttachmentReference2 calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkAttachmentReference2 instance allocated on the specified MemoryStack and 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 new VkAttachmentReference2.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static VkAttachmentReference2.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkAttachmentReference2.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nsType

      public static int nsType(long struct)
      Unsafe version of sType().
    • npNext

      public static long npNext(long struct)
      Unsafe version of pNext().
    • nattachment

      public static int nattachment(long struct)
      Unsafe version of attachment().
    • nlayout

      public static int nlayout(long struct)
      Unsafe version of layout().
    • naspectMask

      public static int naspectMask(long struct)
      Unsafe version of aspectMask().
    • nsType

      public static void nsType(long struct, int value)
      Unsafe version of sType.
    • npNext

      public static void npNext(long struct, long value)
      Unsafe version of pNext.
    • nattachment

      public static void nattachment(long struct, int value)
      Unsafe version of attachment.
    • nlayout

      public static void nlayout(long struct, int value)
      Unsafe version of layout.
    • naspectMask

      public static void naspectMask(long struct, int value)
      Unsafe version of aspectMask.