Parameters defined by this structure with the same name as those in VkAttachmentDescription have the identical effect to those parameters.
If the separateDepthStencilLayouts feature is enabled, and format is a depth/stencil format, initialLayout and finalLayout can be set to a layout that only specifies the layout of the depth aspect.
If the pNext chain includes a VkAttachmentDescriptionStencilLayout structure, then the stencilInitialLayout and stencilFinalLayout members specify the initial and final layouts of the stencil aspect of a depth/stencil format, and initialLayout and finalLayout only apply to the depth aspect. For depth-only formats, the VkAttachmentDescriptionStencilLayout structure is ignored. For stencil-only formats, the initial and final layouts of the stencil aspect are taken from the VkAttachmentDescriptionStencilLayout structure if present, or initialLayout and finalLayout if not present.
If format is a depth/stencil format, and either initialLayout or finalLayout does not specify a layout for the stencil aspect, then the application must specify the initial and final layouts of the stencil aspect by including a VkAttachmentDescriptionStencilLayout structure in the pNext chain.
format must not be FORMAT_UNDEFINEDformat includes a color or depth component and loadOp is ATTACHMENT_LOAD_OP_LOAD, then initialLayout must not be IMAGE_LAYOUT_UNDEFINEDfinalLayout must not be IMAGE_LAYOUT_UNDEFINED or IMAGE_LAYOUT_PREINITIALIZEDformat is a color format, initialLayout must not be IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMALformat is a depth/stencil format, initialLayout must not be IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMALformat is a color format, finalLayout must not be IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMALformat is a depth/stencil format, finalLayout must not be IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMALformat is a color format, initialLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALformat is a color format, finalLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL or IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALseparateDepthStencilLayouts feature is not enabled, initialLayout 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_OPTIMAL,separateDepthStencilLayouts feature is not enabled, finalLayout 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_OPTIMAL,format is a color format, initialLayout 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_OPTIMALformat is a color format, finalLayout 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_OPTIMALformat is a depth/stencil format which includes both depth and stencil components, initialLayout must not be IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMALformat is a depth/stencil format which includes both depth and stencil components, finalLayout must not be IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMALformat is a depth/stencil format which includes only the depth component, initialLayout must not be IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMALformat is a depth/stencil format which includes only the depth component, finalLayout must not be IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMALsynchronization2 feature is not enabled, initialLayout must not be IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHRsynchronization2 feature is not enabled, finalLayout must not be IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR or IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHRattachmentFeedbackLoopLayout feature is not enabled, initialLayout must not be IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXTattachmentFeedbackLoopLayout feature is not enabled, finalLayout must not be IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXTsamples must be a bit value that is set in imageCreateSampleCounts (as defined in Image Creation Limits) for the given formatpNext chain does not include a VkAttachmentDescriptionStencilLayout structure, format includes a stencil component, and stencilLoadOp is ATTACHMENT_LOAD_OP_LOAD, then initialLayout must not be IMAGE_LAYOUT_UNDEFINEDpNext chain does includes a VkAttachmentDescriptionStencilLayout structure, format includes a stencil component, and stencilLoadOp is ATTACHMENT_LOAD_OP_LOAD, then VkAttachmentDescriptionStencilLayout::stencilInitialLayout must not be IMAGE_LAYOUT_UNDEFINEDformat is a depth/stencil format which includes both depth and stencil components, and initialLayout is IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, the pNext chain must include a VkAttachmentDescriptionStencilLayout structureformat is a depth/stencil format which includes both depth and stencil components, and finalLayout is IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, the pNext chain must include a VkAttachmentDescriptionStencilLayout structurepNext chain does not include a VkAttachmentDescriptionStencilLayout structure and format only includes a stencil component, initialLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMALpNext chain does not include a VkAttachmentDescriptionStencilLayout structure and format only includes a stencil component, finalLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL or IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMALsType must be STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2pNext must be NULL or a pointer to a valid instance of VkAttachmentDescriptionStencilLayoutsType value of each struct in the pNext chain must be uniqueflags must be a valid combination of VkAttachmentDescriptionFlagBits valuesformat must be a valid VkFormat valuesamples must be a valid VkSampleCountFlagBits valueloadOp must be a valid VkAttachmentLoadOp valuestoreOp must be a valid VkAttachmentStoreOp valuestencilLoadOp must be a valid VkAttachmentLoadOp valuestencilStoreOp must be a valid VkAttachmentStoreOp valueinitialLayout must be a valid VkImageLayout valuefinalLayout must be a valid VkImageLayout value
struct VkAttachmentDescription2 {
VkStructureType sType;
void const * pNext;
VkAttachmentDescriptionFlags flags;
VkFormat format;
VkSampleCountFlagBits samples;
VkAttachmentLoadOp loadOp;
VkAttachmentStoreOp storeOp;
VkAttachmentLoadOp stencilLoadOp;
VkAttachmentStoreOp stencilStoreOp;
VkImageLayout initialLayout;
VkImageLayout finalLayout;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkAttachmentDescription2.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | FINALLAYOUT
The struct member offsets. |
| public static final int | FLAGS
The struct member offsets. |
| public static final int | FORMAT
The struct member offsets. |
| public static final int | INITIALLAYOUT
The struct member offsets. |
| public static final int | LOADOP
The struct member offsets. |
| public static final int | PNEXT
The struct member offsets. |
| public static final int | SAMPLES
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STENCILLOADOP
The struct member offsets. |
| public static final int | STENCILSTOREOP
The struct member offsets. |
| public static final int | STOREOP
The struct member offsets. |
| public static final int | STYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkAttachmentDescription2(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static VkAttachmentDescription2 | |
| public static VkAttachmentDescription2. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkAttachmentDescription2 | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkAttachmentDescription2. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected VkAttachmentDescription2 | 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 VkAttachmentDescription2 | |
| public static VkAttachmentDescription2 | create(long address)
Returns a new |
| public static VkAttachmentDescription2. | create(int
the buffer capacity capacity)Returns a new |
| public static VkAttachmentDescription2. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkAttachmentDescription2 | |
| public static VkAttachmentDescription2. | |
| public int | finalLayout()
the layout the attachment image subresource will be transitioned to when a render pass instance ends. |
| public VkAttachmentDescription2 | |
| public int | flags()
a bitmask of |
| public VkAttachmentDescription2 | |
| public int | |
| public VkAttachmentDescription2 | |
| public int | initialLayout()
the layout the attachment image subresource will be in when a render pass instance begins. |
| public VkAttachmentDescription2 | |
| public int | loadOp()
a |
| public VkAttachmentDescription2 | |
| public static VkAttachmentDescription2 | |
| public static VkAttachmentDescription2. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkAttachmentDescription2 | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkAttachmentDescription2. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public long | |
| public VkAttachmentDescription2 | |
| public VkAttachmentDescription2 | pNext(VkAttachmentDescriptionStencilLayout value)
Prepends the specified |
| public VkAttachmentDescription2 | pNext(VkAttachmentDescriptionStencilLayoutKHR value)
Prepends the specified |
| public int | |
| public VkAttachmentDescription2 | |
| public VkAttachmentDescription2 | set(int sType, long pNext, int flags, int format, int samples, int loadOp, int storeOp, int stencilLoadOp, int stencilStoreOp, int initialLayout, int finalLayout)
Initializes this struct with the specified values. |
| public VkAttachmentDescription2 | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | stencilLoadOp()
a |
| public VkAttachmentDescription2 | |
| public int | stencilStoreOp()
a |
| public VkAttachmentDescription2 | |
| public int | storeOp()
a |
| public VkAttachmentDescription2 | |
| public int | |
| public VkAttachmentDescription2 | |
| public VkAttachmentDescription2 |