Each element of the pInputAttachments array corresponds to an input attachment index in a fragment shader, i.e. if a shader declares an image variable decorated with a InputAttachmentIndex value of X, then it uses the attachment provided in pInputAttachments[X]. Input attachments must also be bound to the pipeline in a descriptor set. If the attachment member of any element of pInputAttachments is ATTACHMENT_UNUSED, the application must not read from the corresponding input attachment index. Fragment shaders can use subpass input variables to access the contents of an input attachment at the fragment’s (x, y, layer) framebuffer coordinates. Input attachments must not be used by any subpasses within a render pass that enables render pass transform.
Each element of the pColorAttachments array corresponds to an output location in the shader, i.e. if the shader declares an output variable decorated with a Location value of X, then it uses the attachment provided in pColorAttachments[X]. If the attachment member of any element of pColorAttachments is ATTACHMENT_UNUSED, or if Color Write Enable has been disabled for the corresponding attachment index, then writes to the corresponding location by a fragment shader are discarded.
If flags does not include SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, and if pResolveAttachments is not NULL, each of its elements corresponds to a color attachment (the element in pColorAttachments at the same index), and a multisample resolve operation is defined for each attachment unless the resolve attachment index is ATTACHMENT_UNUSED.
Similarly, if flags does not include SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, and VkSubpassDescriptionDepthStencilResolve::pDepthStencilResolveAttachment is not NULL and does not have the value ATTACHMENT_UNUSED, it corresponds to the depth/stencil attachment in pDepthStencilAttachment, and multisample resolve operation for depth and stencil are defined by VkSubpassDescriptionDepthStencilResolve::depthResolveMode and VkSubpassDescriptionDepthStencilResolve::stencilResolveMode, respectively. If VkSubpassDescriptionDepthStencilResolve::depthResolveMode is RESOLVE_MODE_NONE or the pDepthStencilResolveAttachment does not have a depth aspect, no resolve operation is performed for the depth attachment. If VkSubpassDescriptionDepthStencilResolve::stencilResolveMode is RESOLVE_MODE_NONE or the pDepthStencilResolveAttachment does not have a stencil aspect, no resolve operation is performed for the stencil attachment.
If the image subresource range referenced by the depth/stencil attachment is created with IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT, then the multisample resolve operation uses the sample locations state specified in the sampleLocationsInfo member of the element of the VkRenderPassSampleLocationsBeginInfoEXT::pPostSubpassSampleLocations for the subpass.
If pDepthStencilAttachment is NULL, or if its attachment index is ATTACHMENT_UNUSED, it indicates that no depth/stencil attachment will be used in the subpass.
The contents of an attachment within the render area become undefined at the start of a subpass S if all of the following conditions are true:
In addition, the contents of an attachment within the render area become undefined at the start of a subpass S if all of the following conditions are true:
SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM is set.Once the contents of an attachment become undefined in subpass S, they remain undefined for subpasses in subpass dependency chains starting with subpass S until they are written again. However, they remain valid for subpasses in other subpass dependency chains starting with subpass S1 if those subpasses use or preserve the attachment.
attachment member of an element of pInputAttachments is not ATTACHMENT_UNUSED, its layout member must not be IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMALattachment member of an element of pColorAttachments is not ATTACHMENT_UNUSED, its layout member must not be IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMALattachment member of an element of pResolveAttachments is not ATTACHMENT_UNUSED, its layout member must not be IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMALattachment member of pDepthStencilAttachment is not ATTACHMENT_UNUSED, ts layout member must not be IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMALattachment member of an element of pColorAttachments is not ATTACHMENT_UNUSED, its layout member must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALattachment member of an element of pResolveAttachments is not ATTACHMENT_UNUSED, its layout member must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALattachment member of an element of pInputAttachments is not ATTACHMENT_UNUSED, its layout member must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMALattachment member of an element of pColorAttachments is not ATTACHMENT_UNUSED, its layout member must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMALattachment member of an element of pResolveAttachments is not ATTACHMENT_UNUSED, its layout member must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMALattachment member of an element of pInputAttachments is not ATTACHMENT_UNUSED, its layout member must not be IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHRattachment member of an element of pColorAttachments is not ATTACHMENT_UNUSED, its layout member must not be IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHRattachment member of an element of pResolveAttachments is not ATTACHMENT_UNUSED, its layout member must not be IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHRpipelineBindPoint must be PIPELINE_BIND_POINT_GRAPHICS or PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEIcolorAttachmentCount must be less than or equal to VkPhysicalDeviceLimits::maxColorAttachmentsloadOp must not be ATTACHMENT_LOAD_OP_CLEARpResolveAttachments is not NULL, for each resolve attachment that is not ATTACHMENT_UNUSED, the corresponding color attachment must not be ATTACHMENT_UNUSEDpResolveAttachments 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_BITpResolveAttachments is not NULL, each resolve attachment that is not ATTACHMENT_UNUSED must have a sample count of SAMPLE_COUNT_1_BITpResolveAttachments is not NULL, each resolve attachment that is not ATTACHMENT_UNUSED must have the same VkFormat as its corresponding color attachmentVK_AMD_mixed_attachment_samples extension nor the VK_NV_framebuffer_mixed_samples extension is enabled, all attachments in pColorAttachments that are not ATTACHMENT_UNUSED must have the same sample countpInputAttachments that are not ATTACHMENT_UNUSED must have image formats whose potential format features contain at least FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BITpColorAttachments that are not ATTACHMENT_UNUSED must have image formats whose potential format features contain FORMAT_FEATURE_COLOR_ATTACHMENT_BITpResolveAttachments that are not ATTACHMENT_UNUSED must have image formats whose potential format features contain FORMAT_FEATURE_COLOR_ATTACHMENT_BITpDepthStencilAttachment is not NULL and the attachment is not ATTACHMENT_UNUSED then it must have an image format whose potential format features contain FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BITlinearColorAttachment feature is enabled and the image is created with IMAGE_TILING_LINEAR, all attachments in pInputAttachments that are not ATTACHMENT_UNUSED must have image formats whose potential format features must contain FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NVlinearColorAttachment feature is enabled and the image is created with IMAGE_TILING_LINEAR, all attachments in pColorAttachments that are not ATTACHMENT_UNUSED must have image formats whose potential format features must contain FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NVlinearColorAttachment feature is enabled and the image is created with IMAGE_TILING_LINEAR, all attachments in pResolveAttachments that are not ATTACHMENT_UNUSED must have image formats whose potential format features must contain FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NVVK_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_UNUSEDVK_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 countpPreserveAttachments must not be ATTACHMENT_UNUSEDpPreserveAttachments must not also be an element of any other member of the subpass descriptionVkAttachmentReference member, then each use must use the same layoutflags includes SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX, it must also include SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVXflags includes SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, and if pResolveAttachments is not NULL, then each resolve attachment must be ATTACHMENT_UNUSEDflags includes SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, then the subpass must be the last subpass in a subpass dependency chainRENDER_PASS_CREATE_TRANSFORM_BIT_QCOM each of the elements of pInputAttachments must be ATTACHMENT_UNUSEDpDepthStencilAttachment and pColorAttachments must not contain references to the same attachmentflags must be a valid combination of VkSubpassDescriptionFlagBits valuespipelineBindPoint must be a valid VkPipelineBindPoint valueinputAttachmentCount is not 0, pInputAttachments must be a valid pointer to an array of inputAttachmentCount valid VkAttachmentReference structurescolorAttachmentCount is not 0, pColorAttachments must be a valid pointer to an array of colorAttachmentCount valid VkAttachmentReference structurescolorAttachmentCount is not 0, and pResolveAttachments is not NULL, pResolveAttachments must be a valid pointer to an array of colorAttachmentCount valid VkAttachmentReference structurespDepthStencilAttachment is not NULL, pDepthStencilAttachment must be a valid pointer to a valid VkAttachmentReference structurepreserveAttachmentCount is not 0, pPreserveAttachments must be a valid pointer to an array of preserveAttachmentCount uint32_t valuesVkAttachmentReference, VkRenderPassCreateInfo
struct VkSubpassDescription {
VkSubpassDescriptionFlags flags;
VkPipelineBindPoint pipelineBindPoint;
uint32_t inputAttachmentCount;
VkAttachmentReference const * pInputAttachments;
uint32_t colorAttachmentCount;
VkAttachmentReference const * pColorAttachments;
VkAttachmentReference const * pResolveAttachments;
VkAttachmentReference const * pDepthStencilAttachment;
uint32_t preserveAttachmentCount;
uint32_t const * pPreserveAttachments;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkSubpassDescription.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | COLORATTACHMENTCOUNT
The struct member offsets. |
| public static final int | FLAGS
The struct member offsets. |
| public static final int | INPUTATTACHMENTCOUNT
The struct member offsets. |
| public static final int | PCOLORATTACHMENTS
The struct member offsets. |
| public static final int | PDEPTHSTENCILATTACHMENT
The struct member offsets. |
| public static final int | PINPUTATTACHMENTS
The struct member offsets. |
| public static final int | PIPELINEBINDPOINT
The struct member offsets. |
| public static final int | PPRESERVEATTACHMENTS
The struct member offsets. |
| public static final int | PRESERVEATTACHMENTCOUNT
The struct member offsets. |
| public static final int | PRESOLVEATTACHMENTS
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkSubpassDescription(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static VkSubpassDescription | |
| public static VkSubpassDescription. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkSubpassDescription | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkSubpassDescription. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkSubpassDescription | |
| public static VkSubpassDescription | |
| public static VkSubpassDescription. | |
| public static VkSubpassDescription. | |
| public int | |
| public VkSubpassDescription | |
| protected VkSubpassDescription | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkSubpassDescription | |
| public static VkSubpassDescription | |
| public static VkSubpassDescription. | create(int
the buffer capacity capacity)Returns a new |
| public static VkSubpassDescription. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkSubpassDescription | |
| public static VkSubpassDescription. | |
| public int | |
| public VkSubpassDescription | |
| public int | |
| public static VkSubpassDescription | |
| public static VkSubpassDescription. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkSubpassDescription | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkSubpassDescription. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkSubpassDescription | |
| public static VkSubpassDescription | |
| public static VkSubpassDescription. | |
| public static VkSubpassDescription. | |
| public static int | |
| public static void | ncolorAttachmentCount(long struct, int value)
Sets the specified value to the |
| public static int | |
| public static void | |
| public static int | |
| public static void | ninputAttachmentCount(long struct, int value)
Sets the specified value to the |
| public static VkAttachmentReference. | |
| public static void | npColorAttachments(long struct, VkAttachmentReference.
Unsafe version of |
| public static VkAttachmentReference | |
| public static void | npDepthStencilAttachment(long struct, VkAttachmentReference value)
Unsafe version of |
| public static VkAttachmentReference. | |
| public static void | npInputAttachments(long struct, VkAttachmentReference.
Unsafe version of |
| public static int | |
| public static void | |
| public static IntBuffer | |
| public static void | |
| public static int | |
| public static void | npreserveAttachmentCount(long struct, int value)
Sets the specified value to the |
| public static VkAttachmentReference. | |
| public static void | npResolveAttachments(long struct, VkAttachmentReference.
Unsafe version of |
| public VkAttachmentReference. | pColorAttachments()
a pointer to an array of |
| public VkSubpassDescription | pColorAttachments(VkAttachmentReference.
Sets the address of the specified |
| public VkAttachmentReference | pDepthStencilAttachment()
a pointer to a |
| public VkSubpassDescription | pDepthStencilAttachment(VkAttachmentReference value)
Sets the address of the specified |
| public VkAttachmentReference. | pInputAttachments()
a pointer to an array of |
| public VkSubpassDescription | pInputAttachments(VkAttachmentReference.
Sets the address of the specified |
| public int | pipelineBindPoint()
a |
| public VkSubpassDescription | |
| public IntBuffer | pPreserveAttachments()
a pointer to an array of |
| public VkSubpassDescription | pPreserveAttachments(IntBuffer value)
Sets the address of the specified |
| public int | |
| public VkAttachmentReference. | pResolveAttachments()
|
| public VkSubpassDescription | pResolveAttachments(VkAttachmentReference.
Sets the address of the specified |
| public VkSubpassDescription | set(int flags, int pipelineBindPoint, VkAttachmentReference.
Initializes this struct with the specified values. |
| public VkSubpassDescription | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public static void |