Class VkSubpassDescription2

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

public class VkSubpassDescription2 extends org.lwjgl.system.Struct<VkSubpassDescription2> 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.

If a VkFragmentShadingRateAttachmentInfoKHR structure is included in the pNext chain, pFragmentShadingRateAttachment is not NULL, and its attachment member is not ATTACHMENT_UNUSED, the identified attachment defines a fragment shading rate attachment for that subpass.

If any element of pResolveAttachments is an image specified with an VkExternalFormatANDROID, values in the corresponding color attachment will be resolved to the resolve attachment in the same manner as specified for RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID (VkResolveModeFlagBits).

If the nullColorAttachmentWithExternalFormatResolve limit is TRUE, 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. If the color attachment is also used as an input attachment, the same behavior applies.

Setting the color attachment to ATTACHMENT_UNUSED when an external resolve attachment is used and the nullColorAttachmentWithExternalFormatResolve limit is TRUE will not result in color attachment writes to be discarded for that attachment.

When nullColorAttachmentWithExternalFormatResolve is TRUE, the color output from the subpass can still be read via an input attachment; but the application cannot bind an image view for the color attachment as there is no such image view bound. Instead to access the data as an input attachment applications can use the resolve attachment in its place - using the resolve attachment image for the descriptor, and setting the corresponding element of pInputAttachments to the index of the resolve attachment.

Loads or input attachment reads from the resolve attachment are performed as if using a VkSamplerYcbcrConversionCreateInfo with the following parameters:


 VkSamplerYcbcrConversionCreateInfo createInfo = {
     .sType = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO,
     .pNext = NULL,
     .format = VK_FORMAT_UNDEFINED,
     .ycbcrModel = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY,
     .ycbcrRange = VK_SAMPLER_YCBCR_RANGE_ITU_FULL,
     .components = {
         .r = VK_COMPONENT_SWIZZLE_B
         .g = VK_COMPONENT_SWIZZLE_R
         .b = VK_COMPONENT_SWIZZLE_G
         .a = VK_COMPONENT_SWIZZLE_IDENTITY},
     .xChromaOffset = properties.chromaOffsetX,
     .yChromaOffset = properties.chromaOffsetY,
     .chromaFilter = VK_FILTER_NEAREST,
     .forceExplicitReconstruction = ... };

where properties is equal to VkPhysicalDeviceExternalFormatResolvePropertiesANDROID returned by the device and forceExplicitReconstruction is effectively ignored as the SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY model is used. The applied swizzle is the same effective swizzle that would be applied by the SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY model, but no range expansion is applied.

Valid Usage
Valid Usage (Implicit)
See Also

VkAttachmentReference2, VkRenderPassCreateInfo2

Layout


 struct VkSubpassDescription2 {
     VkStructureType sType();
     void const * pNext();
     VkSubpassDescriptionFlags flags();
     VkPipelineBindPoint pipelineBindPoint();
     uint32_t viewMask();
     uint32_t inputAttachmentCount();
     VkAttachmentReference2 const * pInputAttachments();
     uint32_t colorAttachmentCount();
     VkAttachmentReference2 const * pColorAttachments();
     VkAttachmentReference2 const * pResolveAttachments();
     VkAttachmentReference2 const * pDepthStencilAttachment();
     uint32_t preserveAttachmentCount();
     uint32_t const * pPreserveAttachments();
 }