Class VkRenderingAttachmentInfo

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

public class VkRenderingAttachmentInfo extends org.lwjgl.system.Struct<VkRenderingAttachmentInfo> implements org.lwjgl.system.NativeResource
Structure specifying attachment information.
Description

Values in imageView are loaded and stored according to the values of loadOp and storeOp, within the render area for each device specified in VkRenderingInfo. If imageView is NULL_HANDLE, and resolveMode is not RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID, other members of this structure are ignored; writes to this attachment will be discarded, and no load, store, or multisample resolve operations will be performed.

If resolveMode is RESOLVE_MODE_NONE, then resolveImageView is ignored. If resolveMode is not RESOLVE_MODE_NONE, and resolveImageView is not NULL_HANDLE, a render pass multisample resolve operation is defined for the attachment subresource. If resolveMode is RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID, and the nullColorAttachmentWithExternalFormatResolve limit is TRUE, values are only undefined once load operations have completed.

Note

The resolve mode and store operation are independent; it is valid to write both resolved and unresolved values, and equally valid to discard the unresolved values while writing the resolved ones.

Store and resolve operations are only performed at the end of a render pass instance that does not specify the RENDERING_SUSPENDING_BIT_KHR flag.

Load operations are only performed at the beginning of a render pass instance that does not specify the RENDERING_RESUMING_BIT_KHR flag.

Image contents at the end of a suspended render pass instance remain defined for access by a resuming render pass instance.

If the nullColorAttachmentWithExternalFormatResolve limit is TRUE, and resolveMode is RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID, values in the color attachment will be loaded from the resolve attachment at the start of rendering, and may also be reloaded any time after a resolve occurs or the resolve attachment is written to; if this occurs it must happen-before any writes to the color attachment are performed which happen-after the resolve that triggers this. If any color component in the external format is subsampled, values will be read from the nearest sample in the image when they are loaded.

Valid Usage
Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO
  • pNext must be NULL
  • If imageView is not NULL_HANDLE, imageView must be a valid VkImageView handle
  • imageLayout must be a valid VkImageLayout value
  • If resolveMode is not 0, resolveMode must be a valid VkResolveModeFlagBits value
  • If resolveImageView is not NULL_HANDLE, resolveImageView must be a valid VkImageView handle
  • resolveImageLayout must be a valid VkImageLayout value
  • loadOp must be a valid VkAttachmentLoadOp value
  • storeOp must be a valid VkAttachmentStoreOp value
  • clearValue must be a valid VkClearValue union
  • Both of imageView, and resolveImageView that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice
See Also

VkClearValue, VkRenderingInfo

Layout


 struct VkRenderingAttachmentInfo {
     VkStructureType sType();
     void const * pNext();
     VkImageView imageView();
     VkImageLayout imageLayout();
     VkResolveModeFlagBits resolveMode();
     VkImageView resolveImageView();
     VkImageLayout resolveImageLayout();
     VkAttachmentLoadOp loadOp();
     VkAttachmentStoreOp storeOp();
     VkClearValue clearValue();
 }
  • 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.
    • IMAGEVIEW

      public static final int IMAGEVIEW
      The struct member offsets.
    • IMAGELAYOUT

      public static final int IMAGELAYOUT
      The struct member offsets.
    • RESOLVEMODE

      public static final int RESOLVEMODE
      The struct member offsets.
    • RESOLVEIMAGEVIEW

      public static final int RESOLVEIMAGEVIEW
      The struct member offsets.
    • RESOLVEIMAGELAYOUT

      public static final int RESOLVEIMAGELAYOUT
      The struct member offsets.
    • LOADOP

      public static final int LOADOP
      The struct member offsets.
    • STOREOP

      public static final int STOREOP
      The struct member offsets.
    • CLEARVALUE

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

    • VkRenderingAttachmentInfo

      public VkRenderingAttachmentInfo(ByteBuffer container)
      Creates a VkRenderingAttachmentInfo 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<VkRenderingAttachmentInfo>
    • sType

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

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

      public long imageView()
      the image view that will be used for rendering.
    • imageLayout

      public int imageLayout()
      the layout that imageView will be in during rendering.
    • resolveMode

      public int resolveMode()
      a VkResolveModeFlagBits value defining how data written to imageView will be resolved into resolveImageView.
    • resolveImageView

      public long resolveImageView()
      an image view used to write resolved data at the end of rendering.
    • resolveImageLayout

      public int resolveImageLayout()
      the layout that resolveImageView will be in during rendering.
    • loadOp

      public int loadOp()
      a VkAttachmentLoadOp value defining the load operation for the attachment.
    • storeOp

      public int storeOp()
      a VkAttachmentStoreOp value defining the store operation for the attachment.
    • clearValue

      public VkClearValue clearValue()
      a VkClearValue structure defining values used to clear imageView when loadOp is ATTACHMENT_LOAD_OP_CLEAR.
    • sType

      public VkRenderingAttachmentInfo sType(int value)
      Sets the specified value to the sType() field.
    • sType$Default

      public VkRenderingAttachmentInfo sType$Default()
    • pNext

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

      public VkRenderingAttachmentInfo imageView(long value)
      Sets the specified value to the imageView() field.
    • imageLayout

      public VkRenderingAttachmentInfo imageLayout(int value)
      Sets the specified value to the imageLayout() field.
    • resolveMode

      public VkRenderingAttachmentInfo resolveMode(int value)
      Sets the specified value to the resolveMode() field.
    • resolveImageView

      public VkRenderingAttachmentInfo resolveImageView(long value)
      Sets the specified value to the resolveImageView() field.
    • resolveImageLayout

      public VkRenderingAttachmentInfo resolveImageLayout(int value)
      Sets the specified value to the resolveImageLayout() field.
    • loadOp

      public VkRenderingAttachmentInfo loadOp(int value)
      Sets the specified value to the loadOp() field.
    • storeOp

      public VkRenderingAttachmentInfo storeOp(int value)
      Sets the specified value to the storeOp() field.
    • clearValue

      public VkRenderingAttachmentInfo clearValue(VkClearValue value)
      Copies the specified VkClearValue to the clearValue() field.
    • clearValue

      public VkRenderingAttachmentInfo clearValue(Consumer<VkClearValue> consumer)
      Passes the clearValue() field to the specified Consumer.
    • set

      public VkRenderingAttachmentInfo set(int sType, long pNext, long imageView, int imageLayout, int resolveMode, long resolveImageView, int resolveImageLayout, int loadOp, int storeOp, VkClearValue clearValue)
      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 VkRenderingAttachmentInfo malloc()
      Returns a new VkRenderingAttachmentInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

      public static VkRenderingAttachmentInfo calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkRenderingAttachmentInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

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

      public static VkRenderingAttachmentInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkRenderingAttachmentInfo.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().
    • nimageView

      public static long nimageView(long struct)
      Unsafe version of imageView().
    • nimageLayout

      public static int nimageLayout(long struct)
      Unsafe version of imageLayout().
    • nresolveMode

      public static int nresolveMode(long struct)
      Unsafe version of resolveMode().
    • nresolveImageView

      public static long nresolveImageView(long struct)
      Unsafe version of resolveImageView().
    • nresolveImageLayout

      public static int nresolveImageLayout(long struct)
      Unsafe version of resolveImageLayout().
    • nloadOp

      public static int nloadOp(long struct)
      Unsafe version of loadOp().
    • nstoreOp

      public static int nstoreOp(long struct)
      Unsafe version of storeOp().
    • nclearValue

      public static VkClearValue nclearValue(long struct)
      Unsafe version of clearValue().
    • 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.
    • nimageView

      public static void nimageView(long struct, long value)
      Unsafe version of imageView.
    • nimageLayout

      public static void nimageLayout(long struct, int value)
      Unsafe version of imageLayout.
    • nresolveMode

      public static void nresolveMode(long struct, int value)
      Unsafe version of resolveMode.
    • nresolveImageView

      public static void nresolveImageView(long struct, long value)
      Unsafe version of resolveImageView.
    • nresolveImageLayout

      public static void nresolveImageLayout(long struct, int value)
      Unsafe version of resolveImageLayout.
    • nloadOp

      public static void nloadOp(long struct, int value)
      Unsafe version of loadOp.
    • nstoreOp

      public static void nstoreOp(long struct, int value)
      Unsafe version of storeOp.
    • nclearValue

      public static void nclearValue(long struct, VkClearValue value)
      Unsafe version of clearValue.