Class VkRenderingAttachmentInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkRenderingAttachmentInfoKHR
Description
Values in imageView are loaded and stored according to the values of loadOp and storeOp, within the render area for each device specified in VkRenderingInfo. If imageView is NULL_HANDLE, and resolveMode is not RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID, other members of this structure are ignored; writes to this attachment will be discarded, and no load, store, or multisample resolve operations will be performed.
If resolveMode is RESOLVE_MODE_NONE, then resolveImageView is ignored. If resolveMode is not RESOLVE_MODE_NONE, and resolveImageView is not NULL_HANDLE, a render pass multisample resolve operation is defined for the attachment subresource. If resolveMode is RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID, and the nullColorAttachmentWithExternalFormatResolve limit is TRUE, values are only undefined once load operations have completed.
Note
The resolve mode and store operation are independent; it is valid to write both resolved and unresolved values, and equally valid to discard the unresolved values while writing the resolved ones.
Store and resolve operations are only performed at the end of a render pass instance that does not specify the RENDERING_SUSPENDING_BIT_KHR flag.
Load operations are only performed at the beginning of a render pass instance that does not specify the RENDERING_RESUMING_BIT_KHR flag.
Image contents at the end of a suspended render pass instance remain defined for access by a resuming render pass instance.
If the nullColorAttachmentWithExternalFormatResolve limit is TRUE, and resolveMode is RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID, 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.
Valid Usage
- If
imageViewis notNULL_HANDLEand has a non-integer color format,resolveModemust beRESOLVE_MODE_NONEorRESOLVE_MODE_AVERAGE_BIT - If
imageViewis notNULL_HANDLEand has an integer color format,resolveModemust beRESOLVE_MODE_NONEorRESOLVE_MODE_SAMPLE_ZERO_BIT imageViewmust not have a sample count ofSAMPLE_COUNT_1_BITif all of the following hold:imageViewis notNULL_HANDLEresolveModeis notRESOLVE_MODE_NONE- the
pNextchain ofVkRenderingInfodoes not include aVkMultisampledRenderToSingleSampledInfoEXTstructure with themultisampledRenderToSingleSampledEnablefield equal toTRUE
resolveImageViewmust not beNULL_HANDLEif all of the following hold:imageViewis notNULL_HANDLEresolveModeis notRESOLVE_MODE_NONE- the
pNextchain ofVkRenderingInfodoes not include aVkMultisampledRenderToSingleSampledInfoEXTstructure with themultisampledRenderToSingleSampledEnablefield equal toTRUE
- If
imageViewis notNULL_HANDLE,resolveModeis notRESOLVE_MODE_NONE, thepNextchain ofVkRenderingInfoincludes aVkMultisampledRenderToSingleSampledInfoEXTstructure with themultisampledRenderToSingleSampledEnablefield equal toTRUE, andimageViewhas a sample count ofSAMPLE_COUNT_1_BIT,resolveImageViewmust beNULL_HANDLE - If
imageViewis notNULL_HANDLE,resolveImageViewis notNULL_HANDLE, andresolveModeis notRESOLVE_MODE_NONE,resolveImageViewmust have a sample count ofSAMPLE_COUNT_1_BIT - If
imageViewis notNULL_HANDLE,resolveImageViewis notNULL_HANDLE, andresolveModeis notRESOLVE_MODE_NONE,imageViewandresolveImageViewmust have the sameVkFormat - If
imageViewis notNULL_HANDLE,imageLayoutmust not beIMAGE_LAYOUT_UNDEFINED,IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, orIMAGE_LAYOUT_PREINITIALIZED - If
imageViewis notNULL_HANDLEandresolveModeis notRESOLVE_MODE_NONE,resolveImageLayoutmust not beIMAGE_LAYOUT_UNDEFINED,IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, orIMAGE_LAYOUT_PREINITIALIZED - If
imageViewis notNULL_HANDLEandresolveModeis notRESOLVE_MODE_NONE,resolveImageLayoutmust not beIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMALorIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL - If
imageViewis notNULL_HANDLE,imageLayoutmust not beIMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV - If
imageViewis notNULL_HANDLEandresolveModeis notRESOLVE_MODE_NONE,resolveImageLayoutmust not beIMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV - If
imageViewis notNULL_HANDLE,imageLayoutmust not beIMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT - If
imageViewis notNULL_HANDLEandresolveModeis notRESOLVE_MODE_NONE,resolveImageLayoutmust not beIMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT - If
imageViewis notNULL_HANDLEandresolveModeis notRESOLVE_MODE_NONE,resolveImageLayoutmust not beIMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR - If
imageViewis notNULL_HANDLE,imageLayoutmust not beIMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR - If
imageViewis notNULL_HANDLEandresolveModeis notRESOLVE_MODE_NONE,resolveImageLayoutmust not beIMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR - If
imageViewis notNULL_HANDLE,imageLayoutmust not beIMAGE_LAYOUT_PRESENT_SRC_KHR - If
imageViewis notNULL_HANDLEandresolveModeis notRESOLVE_MODE_NONE,resolveImageLayoutmust not beIMAGE_LAYOUT_PRESENT_SRC_KHR - If the
externalFormatResolvefeature is not enabled,resolveModemust not beRESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID - If
resolveModeisRESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID,resolveImageViewmust be a valid image view - If the
nullColorAttachmentWithExternalFormatResolveproperty isTRUEandresolveModeisRESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID,resolveImageViewmust have been created with an image with asamplesvalue ofSAMPLE_COUNT_1_BIT - If
resolveModeisRESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID,resolveImageViewmust have been created with an external format specified byVkExternalFormatANDROID - If
resolveModeisRESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID,resolveImageViewmust have been created with asubresourceRange.layerCountof 1 - If
resolveModeisRESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROIDandnullColorAttachmentWithExternalFormatResolveisTRUE,imageViewmust beNULL_HANDLE - If
resolveModeisRESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROIDandnullColorAttachmentWithExternalFormatResolveisFALSE,imageViewmust be a validVkImageView - If
resolveModeisRESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROIDandnullColorAttachmentWithExternalFormatResolveisFALSE,imageViewmust have a format equal to the value ofVkAndroidHardwareBufferFormatResolvePropertiesANDROID::colorAttachmentFormatas returned by a call toGetAndroidHardwareBufferPropertiesANDROIDfor the Android hardware buffer that was used to createresolveImageView
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_RENDERING_ATTACHMENT_INFOpNextmust beNULL- If
imageViewis notNULL_HANDLE,imageViewmust be a validVkImageViewhandle imageLayoutmust be a validVkImageLayoutvalue- If
resolveModeis not 0,resolveModemust be a validVkResolveModeFlagBitsvalue - If
resolveImageViewis notNULL_HANDLE,resolveImageViewmust be a validVkImageViewhandle resolveImageLayoutmust be a validVkImageLayoutvalueloadOpmust be a validVkAttachmentLoadOpvaluestoreOpmust be a validVkAttachmentStoreOpvalueclearValuemust be a validVkClearValueunion- Both of
imageView, andresolveImageViewthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
See Also
Layout
struct VkRenderingAttachmentInfo {
VkStructureType sType();
void const * pNext();
VkImageView imageView();
VkImageLayout imageLayout();
VkResolveModeFlagBits resolveMode();
VkImageView resolveImageView();
VkImageLayout resolveImageLayout();
VkAttachmentLoadOp loadOp();
VkAttachmentStoreOp storeOp();
VkClearValue clearValue();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkRenderingAttachmentInfo(ByteBuffer container) Creates aVkRenderingAttachmentInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkRenderingAttachmentInfocalloc()Returns a newVkRenderingAttachmentInfoinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkRenderingAttachmentInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkRenderingAttachmentInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.aVkClearValuestructure defining values used to clearimageViewwhenloadOpisATTACHMENT_LOAD_OP_CLEAR.clearValue(Consumer<VkClearValue> consumer) Passes theclearValue()field to the specifiedConsumer.clearValue(VkClearValue value) Copies the specifiedVkClearValueto theclearValue()field.static VkRenderingAttachmentInfocreate()Returns a newVkRenderingAttachmentInfoinstance allocated withBufferUtils.create(int capacity) Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withBufferUtils.static VkRenderingAttachmentInfocreate(long address) Returns a newVkRenderingAttachmentInfoinstance for the specified memory address.create(long address, int capacity) Create aVkRenderingAttachmentInfo.Bufferinstance at the specified memory.static @Nullable VkRenderingAttachmentInfocreateSafe(long address) static @Nullable VkRenderingAttachmentInfo.BuffercreateSafe(long address, int capacity) intthe layout thatimageViewwill be in during rendering.imageLayout(int value) Sets the specified value to theimageLayout()field.longthe image view that will be used for rendering.imageView(long value) Sets the specified value to theimageView()field.intloadOp()aVkAttachmentLoadOpvalue defining the load operation for the attachment.loadOp(int value) Sets the specified value to theloadOp()field.static VkRenderingAttachmentInfomalloc()Returns a newVkRenderingAttachmentInfoinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkRenderingAttachmentInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkRenderingAttachmentInfoinstance allocated on the specifiedMemoryStack.static VkClearValuenclearValue(long struct) Unsafe version ofclearValue().static voidnclearValue(long struct, VkClearValue value) Unsafe version ofclearValue.static intnimageLayout(long struct) Unsafe version ofimageLayout().static voidnimageLayout(long struct, int value) Unsafe version ofimageLayout.static longnimageView(long struct) Unsafe version ofimageView().static voidnimageView(long struct, long value) Unsafe version ofimageView.static intnloadOp(long struct) Unsafe version ofloadOp().static voidnloadOp(long struct, int value) Unsafe version ofloadOp.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static intnresolveImageLayout(long struct) Unsafe version ofresolveImageLayout().static voidnresolveImageLayout(long struct, int value) Unsafe version ofresolveImageLayout.static longnresolveImageView(long struct) Unsafe version ofresolveImageView().static voidnresolveImageView(long struct, long value) Unsafe version ofresolveImageView.static intnresolveMode(long struct) Unsafe version ofresolveMode().static voidnresolveMode(long struct, int value) Unsafe version ofresolveMode.static intnstoreOp(long struct) Unsafe version ofstoreOp().static voidnstoreOp(long struct, int value) Unsafe version ofstoreOp.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.intthe layout thatresolveImageViewwill be in during rendering.resolveImageLayout(int value) Sets the specified value to theresolveImageLayout()field.longan image view used to write resolved data at the end of rendering.resolveImageView(long value) Sets the specified value to theresolveImageView()field.intaVkResolveModeFlagBitsvalue defining how data written toimageViewwill be resolved intoresolveImageView.resolveMode(int value) Sets the specified value to theresolveMode()field.set(int sType, long pNext, long imageView, int imageLayout, int resolveMode, long resolveImageView, int resolveImageLayout, int loadOp, int storeOp, VkClearValue clearValue) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()intstoreOp()aVkAttachmentStoreOpvalue defining the store operation for the attachment.storeOp(int value) Sets the specified value to thestoreOp()field.intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_RENDERING_ATTACHMENT_INFOvalue to thesType()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
IMAGEVIEW
public static final int IMAGEVIEWThe struct member offsets. -
IMAGELAYOUT
public static final int IMAGELAYOUTThe struct member offsets. -
RESOLVEMODE
public static final int RESOLVEMODEThe struct member offsets. -
RESOLVEIMAGEVIEW
public static final int RESOLVEIMAGEVIEWThe struct member offsets. -
RESOLVEIMAGELAYOUT
public static final int RESOLVEIMAGELAYOUTThe struct member offsets. -
LOADOP
public static final int LOADOPThe struct member offsets. -
STOREOP
public static final int STOREOPThe struct member offsets. -
CLEARVALUE
public static final int CLEARVALUEThe struct member offsets.
-
-
Constructor Details
-
VkRenderingAttachmentInfo
Creates aVkRenderingAttachmentInfoinstance at the current position of the specifiedByteBuffercontainer. 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.
-
-
Method Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkRenderingAttachmentInfo>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
imageView
public long imageView()the image view that will be used for rendering. -
imageLayout
public int imageLayout()the layout thatimageViewwill be in during rendering. -
resolveMode
public int resolveMode()aVkResolveModeFlagBitsvalue defining how data written toimageViewwill be resolved intoresolveImageView. -
resolveImageView
public long resolveImageView()an image view used to write resolved data at the end of rendering. -
resolveImageLayout
public int resolveImageLayout()the layout thatresolveImageViewwill be in during rendering. -
loadOp
public int loadOp()aVkAttachmentLoadOpvalue defining the load operation for the attachment. -
storeOp
public int storeOp()aVkAttachmentStoreOpvalue defining the store operation for the attachment. -
clearValue
aVkClearValuestructure defining values used to clearimageViewwhenloadOpisATTACHMENT_LOAD_OP_CLEAR. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_RENDERING_ATTACHMENT_INFOvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
imageView
Sets the specified value to theimageView()field. -
imageLayout
Sets the specified value to theimageLayout()field. -
resolveMode
Sets the specified value to theresolveMode()field. -
resolveImageView
Sets the specified value to theresolveImageView()field. -
resolveImageLayout
Sets the specified value to theresolveImageLayout()field. -
loadOp
Sets the specified value to theloadOp()field. -
storeOp
Sets the specified value to thestoreOp()field. -
clearValue
Copies the specifiedVkClearValueto theclearValue()field. -
clearValue
Passes theclearValue()field to the specifiedConsumer. -
set
public VkRenderingAttachmentInfo set(int sType, long pNext, long imageView, int imageLayout, int resolveMode, long resolveImageView, int resolveImageLayout, int loadOp, int storeOp, VkClearValue clearValue) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkRenderingAttachmentInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkRenderingAttachmentInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkRenderingAttachmentInfoinstance allocated withBufferUtils. -
create
Returns a newVkRenderingAttachmentInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkRenderingAttachmentInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newVkRenderingAttachmentInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkRenderingAttachmentInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkRenderingAttachmentInfo.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkRenderingAttachmentInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
nimageView
public static long nimageView(long struct) Unsafe version ofimageView(). -
nimageLayout
public static int nimageLayout(long struct) Unsafe version ofimageLayout(). -
nresolveMode
public static int nresolveMode(long struct) Unsafe version ofresolveMode(). -
nresolveImageView
public static long nresolveImageView(long struct) Unsafe version ofresolveImageView(). -
nresolveImageLayout
public static int nresolveImageLayout(long struct) Unsafe version ofresolveImageLayout(). -
nloadOp
public static int nloadOp(long struct) Unsafe version ofloadOp(). -
nstoreOp
public static int nstoreOp(long struct) Unsafe version ofstoreOp(). -
nclearValue
Unsafe version ofclearValue(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nimageView
public static void nimageView(long struct, long value) Unsafe version ofimageView. -
nimageLayout
public static void nimageLayout(long struct, int value) Unsafe version ofimageLayout. -
nresolveMode
public static void nresolveMode(long struct, int value) Unsafe version ofresolveMode. -
nresolveImageView
public static void nresolveImageView(long struct, long value) Unsafe version ofresolveImageView. -
nresolveImageLayout
public static void nresolveImageLayout(long struct, int value) Unsafe version ofresolveImageLayout. -
nloadOp
public static void nloadOp(long struct, int value) Unsafe version ofloadOp. -
nstoreOp
public static void nstoreOp(long struct, int value) Unsafe version ofstoreOp. -
nclearValue
Unsafe version ofclearValue.
-