public class VkAttachmentDescription
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
If the attachment uses a color format, then loadOp and storeOp are used, and stencilLoadOp and stencilStoreOp are ignored. If the format has depth and/or stencil components, loadOp and storeOp apply only to the depth data, while stencilLoadOp and stencilStoreOp define how the stencil data is handled. loadOp and stencilLoadOp define the load operations that execute as part of the first subpass that uses the attachment. storeOp and stencilStoreOp define the store operations that execute as part of the last subpass that uses the attachment.
The load operation for each sample in an attachment happens-before any recorded command which accesses the sample in the first subpass where the attachment is used. Load operations for attachments with a depth/stencil format execute in the PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT pipeline stage. Load operations for attachments with a color format execute in the PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage.
The store operation for each sample in an attachment happens-after any recorded command which accesses the sample in the last subpass where the attachment is used. Store operations for attachments with a depth/stencil format execute in the PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stage. Store operations for attachments with a color format execute in the PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage.
If an attachment is not used by any subpass, then loadOp, storeOp, stencilStoreOp, and stencilLoadOp are ignored, and the attachment's memory contents will not be modified by execution of a render pass instance.
The load and store operations apply on the first and last use of each view in the render pass, respectively. If a view index of an attachment is not included in the view mask in any subpass that uses it, then the load and store operations are ignored, and the attachment's memory contents will not be modified by execution of a render pass instance.
During a render pass instance, input/color attachments with color formats that have a component size of 8, 16, or 32 bits must be represented in the attachment's format throughout the instance. Attachments with other floating- or fixed-point color formats, or with depth components may be represented in a format with a precision higher than the attachment format, but must be represented with the same range. When such a component is loaded via the loadOp, it will be converted into an implementation-dependent format used by the render pass. Such components must be converted from the render pass format, to the format of the attachment, before they are resolved or stored at the end of a render pass instance via storeOp. Conversions occur as described in Numeric Representation and Computation and Fixed-Point Data Conversions.
If flags includes ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT, then the attachment is treated as if it shares physical memory with another attachment in the same render pass. This information limits the ability of the implementation to reorder certain operations (like layout transitions and the loadOp) such that it is not improperly reordered against other uses of the same physical memory via a different attachment. This is described in more detail below.
finalLayout must not be IMAGE_LAYOUT_UNDEFINED or IMAGE_LAYOUT_PREINITIALIZEDformat is a color format, initialLayout must not be IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALformat is a depth/stencil format, initialLayout must not be IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMALformat is a color format, name:finalLayout must not be IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALformat is a depth/stencil format, finalLayout must not be IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMALseparateDepthStencilLayouts feature is not enabled, initialLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR, IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR, IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR, or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHRseparateDepthStencilLayouts feature is not enabled, finalLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR, IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR, IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR, or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHRformat is a color format, initialLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR, IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR, IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR, or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHRformat is a color format, finalLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR, IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR, IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR, or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHRformat is a depth/stencil format which includes both depth and stencil aspects, initialLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR, IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR, IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR, or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHRformat is a depth/stencil format which includes both depth and stencil aspects, finalLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR, IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR, IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR, or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHRformat is a depth/stencil format which includes only the depth aspect, initialLayout must not be IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHRformat is a depth/stencil format which includes only the depth aspect, finalLayout must not be IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR or IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHRformat is a depth/stencil format which includes only the stencil aspect, initialLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR or IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHRformat is a depth/stencil format which includes only the stencil aspect, finalLayout must not be IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR or IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHRflags 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 valueflags – a bitmask of VkAttachmentDescriptionFlagBits specifying additional properties of the attachment.format – a VkFormat value specifying the format of the image view that will be used for the attachment.samples – the number of samples of the image as defined in VkSampleCountFlagBits.loadOp – a VkAttachmentLoadOp value specifying how the contents of color and depth components of the attachment are treated at the beginning of the subpass where it is first used.storeOp – a VkAttachmentStoreOp value specifying how the contents of color and depth components of the attachment are treated at the end of the subpass where it is last used.stencilLoadOp – a VkAttachmentLoadOp value specifying how the contents of stencil components of the attachment are treated at the beginning of the subpass where it is first used.stencilStoreOp – a VkAttachmentStoreOp value specifying how the contents of stencil components of the attachment are treated at the end of the last subpass where it is used.initialLayout – the layout the attachment image subresource will be in when a render pass instance begins.finalLayout – the layout the attachment image subresource will be transitioned to when a render pass instance ends.
struct VkAttachmentDescription {
VkAttachmentDescriptionFlags flags;
VkFormat format;
VkSampleCountFlagBits samples;
VkAttachmentLoadOp loadOp;
VkAttachmentStoreOp storeOp;
VkAttachmentLoadOp stencilLoadOp;
VkAttachmentStoreOp stencilStoreOp;
VkImageLayout initialLayout;
VkImageLayout finalLayout;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkAttachmentDescription.Buffer
An array of
VkAttachmentDescription structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
FINALLAYOUT
The struct member offsets.
|
static int |
FLAGS
The struct member offsets.
|
static int |
FORMAT
The struct member offsets.
|
static int |
INITIALLAYOUT
The struct member offsets.
|
static int |
LOADOP
The struct member offsets.
|
static int |
SAMPLES
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STENCILLOADOP
The struct member offsets.
|
static int |
STENCILSTOREOP
The struct member offsets.
|
static int |
STOREOP
The struct member offsets.
|
| Constructor and Description |
|---|
VkAttachmentDescription(java.nio.ByteBuffer container)
Creates a
VkAttachmentDescription instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkAttachmentDescription |
calloc()
Returns a new
VkAttachmentDescription instance allocated with memCalloc. |
static VkAttachmentDescription.Buffer |
calloc(int capacity)
Returns a new
VkAttachmentDescription.Buffer instance allocated with memCalloc. |
static VkAttachmentDescription |
callocStack()
Returns a new
VkAttachmentDescription instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkAttachmentDescription.Buffer |
callocStack(int capacity)
Returns a new
VkAttachmentDescription.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkAttachmentDescription.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkAttachmentDescription.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkAttachmentDescription |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkAttachmentDescription instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkAttachmentDescription |
create()
Returns a new
VkAttachmentDescription instance allocated with BufferUtils. |
static VkAttachmentDescription.Buffer |
create(int capacity)
Returns a new
VkAttachmentDescription.Buffer instance allocated with BufferUtils. |
static VkAttachmentDescription |
create(long address)
Returns a new
VkAttachmentDescription instance for the specified memory address. |
static VkAttachmentDescription.Buffer |
create(long address,
int capacity)
Create a
VkAttachmentDescription.Buffer instance at the specified memory. |
static VkAttachmentDescription |
createSafe(long address)
|
static VkAttachmentDescription.Buffer |
createSafe(long address,
int capacity)
|
int |
finalLayout()
Returns the value of the
finalLayout field. |
VkAttachmentDescription |
finalLayout(int value)
Sets the specified value to the
finalLayout field. |
int |
flags()
Returns the value of the
flags field. |
VkAttachmentDescription |
flags(int value)
Sets the specified value to the
flags field. |
int |
format()
Returns the value of the
format field. |
VkAttachmentDescription |
format(int value)
Sets the specified value to the
format field. |
int |
initialLayout()
Returns the value of the
initialLayout field. |
VkAttachmentDescription |
initialLayout(int value)
Sets the specified value to the
initialLayout field. |
int |
loadOp()
Returns the value of the
loadOp field. |
VkAttachmentDescription |
loadOp(int value)
Sets the specified value to the
loadOp field. |
static VkAttachmentDescription |
malloc()
Returns a new
VkAttachmentDescription instance allocated with memAlloc. |
static VkAttachmentDescription.Buffer |
malloc(int capacity)
Returns a new
VkAttachmentDescription.Buffer instance allocated with memAlloc. |
static VkAttachmentDescription |
mallocStack()
Returns a new
VkAttachmentDescription instance allocated on the thread-local MemoryStack. |
static VkAttachmentDescription.Buffer |
mallocStack(int capacity)
Returns a new
VkAttachmentDescription.Buffer instance allocated on the thread-local MemoryStack. |
static VkAttachmentDescription.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkAttachmentDescription.Buffer instance allocated on the specified MemoryStack. |
static VkAttachmentDescription |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkAttachmentDescription instance allocated on the specified MemoryStack. |
static int |
nfinalLayout(long struct)
Unsafe version of
finalLayout(). |
static void |
nfinalLayout(long struct,
int value)
Unsafe version of
finalLayout. |
static int |
nflags(long struct)
Unsafe version of
flags(). |
static void |
nflags(long struct,
int value)
Unsafe version of
flags. |
static int |
nformat(long struct)
Unsafe version of
format(). |
static void |
nformat(long struct,
int value)
Unsafe version of
format. |
static int |
ninitialLayout(long struct)
Unsafe version of
initialLayout(). |
static void |
ninitialLayout(long struct,
int value)
Unsafe version of
initialLayout. |
static int |
nloadOp(long struct)
Unsafe version of
loadOp(). |
static void |
nloadOp(long struct,
int value)
Unsafe version of
loadOp. |
static int |
nsamples(long struct)
Unsafe version of
samples(). |
static void |
nsamples(long struct,
int value)
Unsafe version of
samples. |
static int |
nstencilLoadOp(long struct)
Unsafe version of
stencilLoadOp(). |
static void |
nstencilLoadOp(long struct,
int value)
Unsafe version of
stencilLoadOp. |
static int |
nstencilStoreOp(long struct)
Unsafe version of
stencilStoreOp(). |
static void |
nstencilStoreOp(long struct,
int value)
Unsafe version of
stencilStoreOp. |
static int |
nstoreOp(long struct)
Unsafe version of
storeOp(). |
static void |
nstoreOp(long struct,
int value)
Unsafe version of
storeOp. |
int |
samples()
Returns the value of the
samples field. |
VkAttachmentDescription |
samples(int value)
Sets the specified value to the
samples field. |
VkAttachmentDescription |
set(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.
|
VkAttachmentDescription |
set(VkAttachmentDescription src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
stencilLoadOp()
Returns the value of the
stencilLoadOp field. |
VkAttachmentDescription |
stencilLoadOp(int value)
Sets the specified value to the
stencilLoadOp field. |
int |
stencilStoreOp()
Returns the value of the
stencilStoreOp field. |
VkAttachmentDescription |
stencilStoreOp(int value)
Sets the specified value to the
stencilStoreOp field. |
int |
storeOp()
Returns the value of the
storeOp field. |
VkAttachmentDescription |
storeOp(int value)
Sets the specified value to the
storeOp field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int FLAGS
public static final int FORMAT
public static final int SAMPLES
public static final int LOADOP
public static final int STOREOP
public static final int STENCILLOADOP
public static final int STENCILSTOREOP
public static final int INITIALLAYOUT
public static final int FINALLAYOUT
public VkAttachmentDescription(java.nio.ByteBuffer container)
VkAttachmentDescription 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int flags()
flags field.public int format()
format field.public int samples()
samples field.public int loadOp()
loadOp field.public int storeOp()
storeOp field.public int stencilLoadOp()
stencilLoadOp field.public int stencilStoreOp()
stencilStoreOp field.public int initialLayout()
initialLayout field.public int finalLayout()
finalLayout field.public VkAttachmentDescription flags(int value)
flags field.public VkAttachmentDescription format(int value)
format field.public VkAttachmentDescription samples(int value)
samples field.public VkAttachmentDescription loadOp(int value)
loadOp field.public VkAttachmentDescription storeOp(int value)
storeOp field.public VkAttachmentDescription stencilLoadOp(int value)
stencilLoadOp field.public VkAttachmentDescription stencilStoreOp(int value)
stencilStoreOp field.public VkAttachmentDescription initialLayout(int value)
initialLayout field.public VkAttachmentDescription finalLayout(int value)
finalLayout field.public VkAttachmentDescription set(int flags, int format, int samples, int loadOp, int storeOp, int stencilLoadOp, int stencilStoreOp, int initialLayout, int finalLayout)
public VkAttachmentDescription set(VkAttachmentDescription src)
src - the source structpublic static VkAttachmentDescription malloc()
VkAttachmentDescription instance allocated with memAlloc. The instance must be explicitly freed.public static VkAttachmentDescription calloc()
VkAttachmentDescription instance allocated with memCalloc. The instance must be explicitly freed.public static VkAttachmentDescription create()
VkAttachmentDescription instance allocated with BufferUtils.public static VkAttachmentDescription create(long address)
VkAttachmentDescription instance for the specified memory address.@Nullable public static VkAttachmentDescription createSafe(long address)
public static VkAttachmentDescription.Buffer malloc(int capacity)
VkAttachmentDescription.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkAttachmentDescription.Buffer calloc(int capacity)
VkAttachmentDescription.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkAttachmentDescription.Buffer create(int capacity)
VkAttachmentDescription.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkAttachmentDescription.Buffer create(long address, int capacity)
VkAttachmentDescription.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkAttachmentDescription.Buffer createSafe(long address, int capacity)
public static VkAttachmentDescription mallocStack()
VkAttachmentDescription instance allocated on the thread-local MemoryStack.public static VkAttachmentDescription callocStack()
VkAttachmentDescription instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkAttachmentDescription mallocStack(org.lwjgl.system.MemoryStack stack)
VkAttachmentDescription instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkAttachmentDescription callocStack(org.lwjgl.system.MemoryStack stack)
VkAttachmentDescription instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkAttachmentDescription.Buffer mallocStack(int capacity)
VkAttachmentDescription.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkAttachmentDescription.Buffer callocStack(int capacity)
VkAttachmentDescription.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkAttachmentDescription.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkAttachmentDescription.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkAttachmentDescription.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkAttachmentDescription.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nflags(long struct)
flags().public static int nformat(long struct)
format().public static int nsamples(long struct)
samples().public static int nloadOp(long struct)
loadOp().public static int nstoreOp(long struct)
storeOp().public static int nstencilLoadOp(long struct)
stencilLoadOp().public static int nstencilStoreOp(long struct)
stencilStoreOp().public static int ninitialLayout(long struct)
initialLayout().public static int nfinalLayout(long struct)
finalLayout().public static void nflags(long struct,
int value)
flags.public static void nformat(long struct,
int value)
format.public static void nsamples(long struct,
int value)
samples.public static void nloadOp(long struct,
int value)
loadOp.public static void nstoreOp(long struct,
int value)
storeOp.public static void nstencilLoadOp(long struct,
int value)
stencilLoadOp.public static void nstencilStoreOp(long struct,
int value)
stencilStoreOp.public static void ninitialLayout(long struct,
int value)
initialLayout.public static void nfinalLayout(long struct,
int value)
finalLayout.Copyright LWJGL. All Rights Reserved. License terms.