Class VkRenderingAttachmentInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkRenderingAttachmentInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkRenderingAttachmentInfoKHR
public class VkRenderingAttachmentInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying attachment information.Description
Values in
imageVieware loaded and stored according to the values ofloadOpandstoreOp, within the render area for each device specified inVkRenderingInfo. IfimageViewisNULL_HANDLE, other members of this structure are ignored; writes to this attachment will be discarded, and no load, store, or resolve operations will be performed.If
resolveModeisRESOLVE_MODE_NONE, thenresolveImageViewis ignored. IfresolveModeis notRESOLVE_MODE_NONE, values inresolveImageViewwithin the render area become undefined once rendering begins. At the end of rendering, the color values written to each pixel location inimageViewwill be resolved according toresolveModeand stored into the the same location inresolveImageView.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_KHRflag.Load operations are only performed at the beginning of a render pass instance that does not specify the
RENDERING_RESUMING_BIT_KHRflag.Image contents at the end of a suspended render pass instance remain defined for access by a resuming render pass instance.
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 - If
imageViewis notNULL_HANDLEandresolveModeis notRESOLVE_MODE_NONE,imageViewmust not have a sample count ofSAMPLE_COUNT_1_BIT - If
imageViewis notNULL_HANDLEandresolveModeis notRESOLVE_MODE_NONE,resolveImageViewmust have a sample count ofSAMPLE_COUNT_1_BIT - If
imageViewis notNULL_HANDLEandresolveModeis notRESOLVE_MODE_NONE,imageViewandresolveImageViewmust have the sameVkFormat - If
imageViewis notNULL_HANDLE,layoutmust 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,layoutmust 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,layoutmust 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,layoutmust 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,layoutmust not beIMAGE_LAYOUT_PRESENT_SRC_KHR - If
imageViewis notNULL_HANDLEandresolveModeis notRESOLVE_MODE_NONE,resolveImageLayoutmust not beIMAGE_LAYOUT_PRESENT_SRC_KHR
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 { VkStructureTypesType(); void const *pNext(); VkImageViewimageView(); VkImageLayoutimageLayout(); VkResolveModeFlagBitsresolveMode(); VkImageViewresolveImageView(); VkImageLayoutresolveImageLayout(); VkAttachmentLoadOploadOp(); VkAttachmentStoreOpstoreOp();VkClearValueclearValue(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkRenderingAttachmentInfo.BufferAn array ofVkRenderingAttachmentInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCLEARVALUE
IMAGELAYOUT
IMAGEVIEW
LOADOP
PNEXT
RESOLVEIMAGELAYOUT
RESOLVEIMAGEVIEW
RESOLVEMODEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTOREOP
STYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkRenderingAttachmentInfo(java.nio.ByteBuffer container)Creates aVkRenderingAttachmentInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkRenderingAttachmentInfocalloc()Returns a newVkRenderingAttachmentInfoinstance allocated withmemCalloc.static VkRenderingAttachmentInfo.Buffercalloc(int capacity)Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withmemCalloc.static VkRenderingAttachmentInfo.Buffercalloc(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.VkClearValueclearValue()aVkClearValuestructure defining values used to clearimageViewwhenloadOpisATTACHMENT_LOAD_OP_CLEAR.VkRenderingAttachmentInfoclearValue(java.util.function.Consumer<VkClearValue> consumer)Passes theclearValue()field to the specifiedConsumer.VkRenderingAttachmentInfoclearValue(VkClearValue value)Copies the specifiedVkClearValueto theclearValue()field.static VkRenderingAttachmentInfocreate()Returns a newVkRenderingAttachmentInfoinstance allocated withBufferUtils.static VkRenderingAttachmentInfo.Buffercreate(int capacity)Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withBufferUtils.static VkRenderingAttachmentInfocreate(long address)Returns a newVkRenderingAttachmentInfoinstance for the specified memory address.static VkRenderingAttachmentInfo.Buffercreate(long address, int capacity)Create aVkRenderingAttachmentInfo.Bufferinstance at the specified memory.static VkRenderingAttachmentInfocreateSafe(long address)static VkRenderingAttachmentInfo.BuffercreateSafe(long address, int capacity)intimageLayout()the layout thatimageViewwill be in during rendering.VkRenderingAttachmentInfoimageLayout(int value)Sets the specified value to theimageLayout()field.longimageView()the image view that will be used for rendering.VkRenderingAttachmentInfoimageView(long value)Sets the specified value to theimageView()field.intloadOp()aVkAttachmentLoadOpvalue specifying how the contents ofimageVieware treated at the start of the render pass instance.VkRenderingAttachmentInfoloadOp(int value)Sets the specified value to theloadOp()field.static VkRenderingAttachmentInfomalloc()Returns a newVkRenderingAttachmentInfoinstance allocated withmemAlloc.static VkRenderingAttachmentInfo.Buffermalloc(int capacity)Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withmemAlloc.static VkRenderingAttachmentInfo.Buffermalloc(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.VkRenderingAttachmentInfopNext(long value)Sets the specified value to thepNext()field.intresolveImageLayout()the layout thatresolveImageViewwill be in during rendering.VkRenderingAttachmentInforesolveImageLayout(int value)Sets the specified value to theresolveImageLayout()field.longresolveImageView()an image view used to write resolved multisample data at the end of rendering.VkRenderingAttachmentInforesolveImageView(long value)Sets the specified value to theresolveImageView()field.intresolveMode()aVkResolveModeFlagBitsvalue defining how multisampled data written toimageViewwill be resolved.VkRenderingAttachmentInforesolveMode(int value)Sets the specified value to theresolveMode()field.VkRenderingAttachmentInfoset(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.VkRenderingAttachmentInfoset(VkRenderingAttachmentInfo src)Copies the specified struct data to this struct.intsizeof()intstoreOp()aVkAttachmentStoreOpvalue specifying how the contents ofimageVieware treated at the end of the render pass instance.VkRenderingAttachmentInfostoreOp(int value)Sets the specified value to thestoreOp()field.intsType()the type of this structure.VkRenderingAttachmentInfosType(int value)Sets the specified value to thesType()field.VkRenderingAttachmentInfosType$Default()Sets theSTRUCTURE_TYPE_RENDERING_ATTACHMENT_INFOvalue to thesType()field.
-
-
-
Constructor Detail
-
VkRenderingAttachmentInfo
public VkRenderingAttachmentInfo(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of 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 multisampled data written toimageViewwill be resolved.
-
resolveImageView
public long resolveImageView()
an image view used to write resolved multisample data at the end of rendering.
-
resolveImageLayout
public int resolveImageLayout()
the layout thatresolveImageViewwill be in during rendering.
-
loadOp
public int loadOp()
aVkAttachmentLoadOpvalue specifying how the contents ofimageVieware treated at the start of the render pass instance.
-
storeOp
public int storeOp()
aVkAttachmentStoreOpvalue specifying how the contents ofimageVieware treated at the end of the render pass instance.
-
clearValue
public VkClearValue clearValue()
aVkClearValuestructure defining values used to clearimageViewwhenloadOpisATTACHMENT_LOAD_OP_CLEAR.
-
sType
public VkRenderingAttachmentInfo sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkRenderingAttachmentInfo sType$Default()
Sets theSTRUCTURE_TYPE_RENDERING_ATTACHMENT_INFOvalue to thesType()field.
-
pNext
public VkRenderingAttachmentInfo pNext(long value)
Sets the specified value to thepNext()field.
-
imageView
public VkRenderingAttachmentInfo imageView(long value)
Sets the specified value to theimageView()field.
-
imageLayout
public VkRenderingAttachmentInfo imageLayout(int value)
Sets the specified value to theimageLayout()field.
-
resolveMode
public VkRenderingAttachmentInfo resolveMode(int value)
Sets the specified value to theresolveMode()field.
-
resolveImageView
public VkRenderingAttachmentInfo resolveImageView(long value)
Sets the specified value to theresolveImageView()field.
-
resolveImageLayout
public VkRenderingAttachmentInfo resolveImageLayout(int value)
Sets the specified value to theresolveImageLayout()field.
-
loadOp
public VkRenderingAttachmentInfo loadOp(int value)
Sets the specified value to theloadOp()field.
-
storeOp
public VkRenderingAttachmentInfo storeOp(int value)
Sets the specified value to thestoreOp()field.
-
clearValue
public VkRenderingAttachmentInfo clearValue(VkClearValue value)
Copies the specifiedVkClearValueto theclearValue()field.
-
clearValue
public VkRenderingAttachmentInfo clearValue(java.util.function.Consumer<VkClearValue> consumer)
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
public VkRenderingAttachmentInfo set(VkRenderingAttachmentInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkRenderingAttachmentInfo malloc()
Returns a newVkRenderingAttachmentInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkRenderingAttachmentInfo calloc()
Returns a newVkRenderingAttachmentInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkRenderingAttachmentInfo create()
Returns a newVkRenderingAttachmentInfoinstance allocated withBufferUtils.
-
create
public static VkRenderingAttachmentInfo create(long address)
Returns a newVkRenderingAttachmentInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VkRenderingAttachmentInfo createSafe(long address)
-
malloc
public static VkRenderingAttachmentInfo.Buffer malloc(int capacity)
Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkRenderingAttachmentInfo.Buffer calloc(int capacity)
Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkRenderingAttachmentInfo.Buffer create(int capacity)
Returns a newVkRenderingAttachmentInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkRenderingAttachmentInfo.Buffer create(long address, int capacity)
Create aVkRenderingAttachmentInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkRenderingAttachmentInfo.Buffer createSafe(long address, int capacity)
-
malloc
public static VkRenderingAttachmentInfo malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderingAttachmentInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkRenderingAttachmentInfo calloc(org.lwjgl.system.MemoryStack stack)
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:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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
public static VkClearValue nclearValue(long struct)
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
public static void nclearValue(long struct, VkClearValue value)Unsafe version ofclearValue.
-
-