Class VkSubpassDescription2KHR

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

    public class VkSubpassDescription2KHR
    extends Struct
    implements 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, the sample count of each element of pColorAttachments must be anything other than SAMPLE_COUNT_1_BIT
    • Any given element of pResolveAttachments 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
    • 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 any input attachments are ATTACHMENT_UNUSED, then any pipelines bound during the subpass must not access those input attachments from the fragment shader
    • 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 as both an input attachment and a color or depth/stencil attachment, 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
    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 VkAttachmentReference structures defining the input attachments for this subpass and their layouts.
    • colorAttachmentCount – the number of color attachments.
    • pColorAttachments – an array of VkAttachmentReference structures defining the color attachments for this subpass and their layouts.
    • pResolveAttachments – an optional array of colorAttachmentCount VkAttachmentReference structures defining the resolve attachments for this subpass and their layouts.
    • pDepthStencilAttachment – a pointer to a VkAttachmentReference 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;
     }