Class VkSubpassDescription2KHR

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class VkSubpassDescription2KHR
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying a subpass description.
    Description

    Parameters defined by this structure with the same name as those in VkSubpassDescription have the identical effect to those parameters.

    viewMask has the same effect for the described subpass as VkRenderPassMultiviewCreateInfo::pViewMasks has on each corresponding subpass.

    Valid Usage
    • pipelineBindPoint must be PIPELINE_BIND_POINT_GRAPHICS
    • colorAttachmentCount must be less than or equal to VkPhysicalDeviceLimits::maxColorAttachments
    • If the first use of an attachment in this render pass is as an input attachment, and the attachment is not also used as a color or depth/stencil attachment in the same subpass, then loadOp must not be ATTACHMENT_LOAD_OP_CLEAR
    • If pResolveAttachments is not NULL, for each resolve attachment that does not have the value ATTACHMENT_UNUSED, the corresponding color attachment must not have the value ATTACHMENT_UNUSED
    • If pResolveAttachments is not NULL, for each resolve attachment that is not ATTACHMENT_UNUSED, the corresponding color attachment must not have a sample count of SAMPLE_COUNT_1_BIT
    • If pResolveAttachments is not NULL, each resolve attachment that is not ATTACHMENT_UNUSED must have a sample count of SAMPLE_COUNT_1_BIT
    • Any given element of pResolveAttachments must have the same VkFormat as its corresponding color attachment
    • All attachments in pColorAttachments that are not ATTACHMENT_UNUSED must have the same sample count
    • If the VK_AMD_mixed_attachment_samples extension is enabled, all attachments in pColorAttachments that are not ATTACHMENT_UNUSED must have a sample count that is smaller than or equal to the sample count of pDepthStencilAttachment if it is not ATTACHMENT_UNUSED
    • If neither the VK_AMD_mixed_attachment_samples nor the VK_NV_framebuffer_mixed_samples extensions are enabled, and if pDepthStencilAttachment is not ATTACHMENT_UNUSED and any attachments in pColorAttachments are not ATTACHMENT_UNUSED, they must have the same sample count
    • The attachment member of any element of pPreserveAttachments must not be ATTACHMENT_UNUSED
    • Any given element of pPreserveAttachments must not also be an element of any other member of the subpass description
    • If any attachment is used by more than one VkAttachmentReference member, then each use must use the same layout
    • If flags includes SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX, it must also include SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX.
    • The aspectMask member of any element of pInputAttachments must be a valid combination of VkImageAspectFlagBits
    • The aspectMask member of any element of pInputAttachments must not be 0
    • The aspectMask member of each element of pInputAttachments must not include IMAGE_ASPECT_METADATA_BIT
    Valid Usage (Implicit)
    • sType must be STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR
    • flags must be a valid combination of VkSubpassDescriptionFlagBits values
    • pipelineBindPoint must be a valid VkPipelineBindPoint value
    • If inputAttachmentCount is not 0, pInputAttachments must be a valid pointer to an array of inputAttachmentCount valid VkAttachmentReference2KHR structures
    • If colorAttachmentCount is not 0, pColorAttachments must be a valid pointer to an array of colorAttachmentCount valid VkAttachmentReference2KHR structures
    • If colorAttachmentCount is not 0, and pResolveAttachments is not NULL, pResolveAttachments must be a valid pointer to an array of colorAttachmentCount valid VkAttachmentReference2KHR structures
    • If pDepthStencilAttachment is not NULL, pDepthStencilAttachment must be a valid pointer to a valid VkAttachmentReference2KHR structure
    • If preserveAttachmentCount is not 0, pPreserveAttachments must be a valid pointer to an array of preserveAttachmentCount uint32_t values
    See Also

    VkAttachmentReference2KHR, VkRenderPassCreateInfo2KHR

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • flags – a bitmask of VkSubpassDescriptionFlagBits specifying usage of the subpass.
    • pipelineBindPoint – a VkPipelineBindPoint value specifying the pipeline type supported for this subpass.
    • viewMask – a bitfield of view indices describing which views rendering is broadcast to in this subpass, when multiview is enabled.
    • inputAttachmentCount – the number of input attachments.
    • pInputAttachments – an array of VkAttachmentReference2KHR structures defining the input attachments for this subpass and their layouts.
    • colorAttachmentCount – the number of color attachments.
    • pColorAttachments – an array of VkAttachmentReference2KHR structures defining the color attachments for this subpass and their layouts.
    • pResolveAttachments – an optional array of colorAttachmentCount VkAttachmentReference2KHR structures defining the resolve attachments for this subpass and their layouts.
    • pDepthStencilAttachment – a pointer to a VkAttachmentReference2KHR specifying the depth/stencil attachment for this subpass and its layout.
    • preserveAttachmentCount – the number of preserved attachments.
    • pPreserveAttachments – an array of preserveAttachmentCount render pass attachment indices identifying attachments that are not used by this subpass, but whose contents must be preserved throughout the subpass.

    Layout

    
     struct VkSubpassDescription2KHR {
         VkStructureType sType;
         void const * pNext;
         VkSubpassDescriptionFlags flags;
         VkPipelineBindPoint pipelineBindPoint;
         uint32_t viewMask;
         uint32_t inputAttachmentCount;
         VkAttachmentReference2KHR const * pInputAttachments;
         uint32_t colorAttachmentCount;
         VkAttachmentReference2KHR const * pColorAttachments;
         VkAttachmentReference2KHR const * pResolveAttachments;
         VkAttachmentReference2KHR const * pDepthStencilAttachment;
         uint32_t preserveAttachmentCount;
         uint32_t const * pPreserveAttachments;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, FLAGS, PIPELINEBINDPOINT, VIEWMASK, INPUTATTACHMENTCOUNT, PINPUTATTACHMENTS, COLORATTACHMENTCOUNT, PCOLORATTACHMENTS, PRESOLVEATTACHMENTS, PDEPTHSTENCILATTACHMENT, PRESERVEATTACHMENTCOUNT, PPRESERVEATTACHMENTS

        The struct member offsets.
    • Constructor Detail

      • VkSubpassDescription2KHR

        public VkSubpassDescription2KHR​(java.nio.ByteBuffer container)
        Creates a VkSubpassDescription2KHR 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • sType

        public int sType()
        Returns the value of the sType field.
      • pNext

        public long pNext()
        Returns the value of the pNext field.
      • flags

        public int flags()
        Returns the value of the flags field.
      • pipelineBindPoint

        public int pipelineBindPoint()
        Returns the value of the pipelineBindPoint field.
      • viewMask

        public int viewMask()
        Returns the value of the viewMask field.
      • inputAttachmentCount

        public int inputAttachmentCount()
        Returns the value of the inputAttachmentCount field.
      • colorAttachmentCount

        public int colorAttachmentCount()
        Returns the value of the colorAttachmentCount field.
      • preserveAttachmentCount

        public int preserveAttachmentCount()
        Returns the value of the preserveAttachmentCount field.
      • pPreserveAttachments

        @Nullable
        public java.nio.IntBuffer pPreserveAttachments()
        Returns a IntBuffer view of the data pointed to by the pPreserveAttachments field.
      • pipelineBindPoint

        public VkSubpassDescription2KHR pipelineBindPoint​(int value)
        Sets the specified value to the pipelineBindPoint field.
      • colorAttachmentCount

        public VkSubpassDescription2KHR colorAttachmentCount​(int value)
        Sets the specified value to the colorAttachmentCount field.
      • pPreserveAttachments

        public VkSubpassDescription2KHR pPreserveAttachments​(@Nullable
                                                             java.nio.IntBuffer value)
        Sets the address of the specified IntBuffer to the pPreserveAttachments field.
      • malloc

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

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

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

        public static VkSubpassDescription2KHR create​(long address)
        Returns a new VkSubpassDescription2KHR instance for the specified memory address.
      • mallocStack

        public static VkSubpassDescription2KHR mallocStack()
        Returns a new VkSubpassDescription2KHR instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VkSubpassDescription2KHR callocStack()
        Returns a new VkSubpassDescription2KHR instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static VkSubpassDescription2KHR mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkSubpassDescription2KHR instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

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

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

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

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

        public static int nflags​(long struct)
        Unsafe version of flags().
      • npipelineBindPoint

        public static int npipelineBindPoint​(long struct)
        Unsafe version of pipelineBindPoint().
      • nviewMask

        public static int nviewMask​(long struct)
        Unsafe version of viewMask().
      • ninputAttachmentCount

        public static int ninputAttachmentCount​(long struct)
        Unsafe version of inputAttachmentCount().
      • ncolorAttachmentCount

        public static int ncolorAttachmentCount​(long struct)
        Unsafe version of colorAttachmentCount().
      • npreserveAttachmentCount

        public static int npreserveAttachmentCount​(long struct)
        Unsafe version of preserveAttachmentCount().
      • npPreserveAttachments

        @Nullable
        public static java.nio.IntBuffer npPreserveAttachments​(long struct)
        Unsafe version of pPreserveAttachments.
      • 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.
      • nflags

        public static void nflags​(long struct,
                                  int value)
        Unsafe version of flags.
      • npipelineBindPoint

        public static void npipelineBindPoint​(long struct,
                                              int value)
        Unsafe version of pipelineBindPoint.
      • nviewMask

        public static void nviewMask​(long struct,
                                     int value)
        Unsafe version of viewMask.
      • ninputAttachmentCount

        public static void ninputAttachmentCount​(long struct,
                                                 int value)
        Sets the specified value to the inputAttachmentCount field of the specified struct.
      • ncolorAttachmentCount

        public static void ncolorAttachmentCount​(long struct,
                                                 int value)
        Sets the specified value to the colorAttachmentCount field of the specified struct.
      • npreserveAttachmentCount

        public static void npreserveAttachmentCount​(long struct,
                                                    int value)
        Sets the specified value to the preserveAttachmentCount field of the specified struct.
      • npPreserveAttachments

        public static void npPreserveAttachments​(long struct,
                                                 @Nullable
                                                 java.nio.IntBuffer value)
        Unsafe version of pPreserveAttachments.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array