Package org.lwjgl.vulkan
Class VkRenderPassCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkRenderPassCreateInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkRenderPassCreateInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying parameters of a newly created render pass.Description
Note
Care should be taken to avoid a data race here; if any subpasses access attachments with overlapping memory locations, and one of those accesses is a write, a subpass dependency needs to be included between them.
Valid Usage
- If the
attachmentmember of any element ofpInputAttachments,pColorAttachments,pResolveAttachmentsorpDepthStencilAttachment, or any element ofpPreserveAttachmentsin any element ofpSubpassesis notATTACHMENT_UNUSED, it must be less thanattachmentCount - For any member of
pAttachmentswith aloadOpequal toATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify alayoutequal toIMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMALorIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL. - For any member of
pAttachmentswith astencilLoadOpequal toATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify alayoutequal toIMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMALorIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL. - For any member of
pAttachmentswith aloadOpequal toATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify alayoutequal toIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL. - For any member of
pAttachmentswith astencilLoadOpequal toATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify alayoutequal toIMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL. - If the
pNextchain includes an instance ofVkRenderPassInputAttachmentAspectCreateInfo, thesubpassmember of each element of itspAspectReferencesmember must be less thansubpassCount - If the
pNextchain includes an instance ofVkRenderPassInputAttachmentAspectCreateInfo, theinputAttachmentIndexmember of each element of itspAspectReferencesmember must be less than the value ofinputAttachmentCountin the member ofpSubpassesidentified by itssubpassmember - If the
pNextchain includes an instance ofVkRenderPassInputAttachmentAspectCreateInfo, for any element of thepInputAttachmentsmember of any element ofpSubpasseswhere theattachmentmember is notATTACHMENT_UNUSED, theaspectMaskmember of the corresponding element ofVkRenderPassInputAttachmentAspectCreateInfo::pAspectReferencesmust only include aspects that are present in images of the format specified by the element ofpAttachmentsatattachment - If the
pNextchain includes an instance ofVkRenderPassMultiviewCreateInfo, and itssubpassCountmember is not zero, that member must be equal to the value ofsubpassCount - If the
pNextchain includes an instance ofVkRenderPassMultiviewCreateInfo, if itsdependencyCountmember is not zero, it must be equal todependencyCount - If the
pNextchain includes an instance ofVkRenderPassMultiviewCreateInfo, for each non-zero element ofpViewOffsets, thesrcSubpassanddstSubpassmembers ofpDependenciesat the same index must not be equal - If the
pNextchain includes an instance ofVkRenderPassMultiviewCreateInfo, for any element ofpDependencieswith adependencyFlagsmember that does not includeDEPENDENCY_VIEW_LOCAL_BIT, the corresponding element of thepViewOffsetsmember of thatVkRenderPassMultiviewCreateInfoinstance must be 0 - If the
pNextchain includes an instance ofVkRenderPassMultiviewCreateInfo, elements of itspViewMasksmember must either all be 0, or all not be 0 - If the
pNextchain includes an instance ofVkRenderPassMultiviewCreateInfo, and each element of itspViewMasksmember is 0, thedependencyFlagsmember of each element ofpDependenciesmust not includeDEPENDENCY_VIEW_LOCAL_BIT - If the
pNextchain includes an instance ofVkRenderPassMultiviewCreateInfo, and each element of itspViewMasksmember is 0,correlatedViewMaskCountmust be 0 - If the
pNextchain includes an instance ofVkRenderPassMultiviewCreateInfo, each element of itspViewMaskmember must not have a bit set at an index greater than or equal toVkPhysicalDeviceLimits::maxFramebufferLayers - For any element of
pDependencies, if thesrcSubpassis notSUBPASS_EXTERNAL, all stage flags included in thesrcStageMaskmember of that dependency must be a pipeline stage supported by the pipeline identified by thepipelineBindPointmember of the source subpass - For any element of
pDependencies, if thedstSubpassis notSUBPASS_EXTERNAL, all stage flags included in thedstStageMaskmember of that dependency must be a pipeline stage supported by the pipeline identified by thepipelineBindPointmember of the destination subpass - The
srcSubpassmember of each element ofpDependenciesmust be less thansubpassCount - The
dstSubpassmember of each element ofpDependenciesmust be less thansubpassCount
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_RENDER_PASS_CREATE_INFO- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkRenderPassFragmentDensityMapCreateInfoEXT,VkRenderPassInputAttachmentAspectCreateInfo, orVkRenderPassMultiviewCreateInfo - Each
sTypemember in thepNextchain must be unique - If
attachmentCountis not 0,pAttachmentsmust be a valid pointer to an array ofattachmentCountvalidVkAttachmentDescriptionstructures pSubpassesmust be a valid pointer to an array ofsubpassCountvalidVkSubpassDescriptionstructures- If
dependencyCountis not 0,pDependenciesmust be a valid pointer to an array ofdependencyCountvalidVkSubpassDependencystructures subpassCountmust be greater than 0
See Also
VkAttachmentDescription,VkSubpassDependency,VkSubpassDescription,CreateRenderPassMember documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.flags– reserved for future use.attachmentCount– the number of attachments used by this render pass.pAttachments– points to an array ofattachmentCountVkAttachmentDescriptionstructures describing the attachments used by the render pass.subpassCount– the number of subpasses to create.pSubpasses– points to an array ofsubpassCountVkSubpassDescriptionstructures describing each subpass.dependencyCount– the number of memory dependencies between pairs of subpasses.pDependencies– points to an array ofdependencyCountVkSubpassDependencystructures describing dependencies between pairs of subpasses.
Layout
struct VkRenderPassCreateInfo { VkStructureType sType; void const * pNext; VkRenderPassCreateFlags flags; uint32_t attachmentCount;VkAttachmentDescriptionconst * pAttachments; uint32_t subpassCount;VkSubpassDescriptionconst * pSubpasses; uint32_t dependencyCount;VkSubpassDependencyconst * pDependencies; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkRenderPassCreateInfo.BufferAn array ofVkRenderPassCreateInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intATTACHMENTCOUNT
DEPENDENCYCOUNT
FLAGS
PATTACHMENTS
PDEPENDENCIES
PNEXT
PSUBPASSESThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPE
SUBPASSCOUNTThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkRenderPassCreateInfo(java.nio.ByteBuffer container)Creates aVkRenderPassCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intattachmentCount()Returns the value of theattachmentCountfield.static VkRenderPassCreateInfocalloc()Returns a newVkRenderPassCreateInfoinstance allocated withmemCalloc.static VkRenderPassCreateInfo.Buffercalloc(int capacity)Returns a newVkRenderPassCreateInfo.Bufferinstance allocated withmemCalloc.static VkRenderPassCreateInfocallocStack()Returns a newVkRenderPassCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkRenderPassCreateInfo.BuffercallocStack(int capacity)Returns a newVkRenderPassCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkRenderPassCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkRenderPassCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkRenderPassCreateInfocallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkRenderPassCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkRenderPassCreateInfocreate()Returns a newVkRenderPassCreateInfoinstance allocated withBufferUtils.static VkRenderPassCreateInfo.Buffercreate(int capacity)Returns a newVkRenderPassCreateInfo.Bufferinstance allocated withBufferUtils.static VkRenderPassCreateInfocreate(long address)Returns a newVkRenderPassCreateInfoinstance for the specified memory address.static VkRenderPassCreateInfo.Buffercreate(long address, int capacity)Create aVkRenderPassCreateInfo.Bufferinstance at the specified memory.static VkRenderPassCreateInfocreateSafe(long address)static VkRenderPassCreateInfo.BuffercreateSafe(long address, int capacity)intdependencyCount()Returns the value of thedependencyCountfield.intflags()Returns the value of theflagsfield.VkRenderPassCreateInfoflags(int value)Sets the specified value to theflagsfield.static VkRenderPassCreateInfomalloc()Returns a newVkRenderPassCreateInfoinstance allocated withmemAlloc.static VkRenderPassCreateInfo.Buffermalloc(int capacity)Returns a newVkRenderPassCreateInfo.Bufferinstance allocated withmemAlloc.static VkRenderPassCreateInfomallocStack()Returns a newVkRenderPassCreateInfoinstance allocated on the thread-localMemoryStack.static VkRenderPassCreateInfo.BuffermallocStack(int capacity)Returns a newVkRenderPassCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkRenderPassCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkRenderPassCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkRenderPassCreateInfomallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkRenderPassCreateInfoinstance allocated on the specifiedMemoryStack.static intnattachmentCount(long struct)Unsafe version ofattachmentCount().static voidnattachmentCount(long struct, int value)Sets the specified value to theattachmentCountfield of the specifiedstruct.static intndependencyCount(long struct)Unsafe version ofdependencyCount().static voidndependencyCount(long struct, int value)Sets the specified value to thedependencyCountfield of the specifiedstruct.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static VkAttachmentDescription.BuffernpAttachments(long struct)Unsafe version ofpAttachments().static voidnpAttachments(long struct, VkAttachmentDescription.Buffer value)Unsafe version ofpAttachments.static VkSubpassDependency.BuffernpDependencies(long struct)Unsafe version ofpDependencies().static voidnpDependencies(long struct, VkSubpassDependency.Buffer value)Unsafe version ofpDependencies.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static VkSubpassDescription.BuffernpSubpasses(long struct)Unsafe version ofpSubpasses().static voidnpSubpasses(long struct, VkSubpassDescription.Buffer value)Unsafe version ofpSubpasses.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.static intnsubpassCount(long struct)Unsafe version ofsubpassCount().static voidnsubpassCount(long struct, int value)Sets the specified value to thesubpassCountfield of the specifiedstruct.VkAttachmentDescription.BufferpAttachments()Returns aVkAttachmentDescription.Bufferview of the struct array pointed to by thepAttachmentsfield.VkRenderPassCreateInfopAttachments(VkAttachmentDescription.Buffer value)Sets the address of the specifiedVkAttachmentDescription.Bufferto thepAttachmentsfield.VkSubpassDependency.BufferpDependencies()Returns aVkSubpassDependency.Bufferview of the struct array pointed to by thepDependenciesfield.VkRenderPassCreateInfopDependencies(VkSubpassDependency.Buffer value)Sets the address of the specifiedVkSubpassDependency.Bufferto thepDependenciesfield.longpNext()Returns the value of thepNextfield.VkRenderPassCreateInfopNext(long value)Sets the specified value to thepNextfield.VkSubpassDescription.BufferpSubpasses()Returns aVkSubpassDescription.Bufferview of the struct array pointed to by thepSubpassesfield.VkRenderPassCreateInfopSubpasses(VkSubpassDescription.Buffer value)Sets the address of the specifiedVkSubpassDescription.Bufferto thepSubpassesfield.VkRenderPassCreateInfoset(int sType, long pNext, int flags, VkAttachmentDescription.Buffer pAttachments, VkSubpassDescription.Buffer pSubpasses, VkSubpassDependency.Buffer pDependencies)Initializes this struct with the specified values.VkRenderPassCreateInfoset(VkRenderPassCreateInfo src)Copies the specified struct data to this struct.intsizeof()intsType()Returns the value of thesTypefield.VkRenderPassCreateInfosType(int value)Sets the specified value to thesTypefield.intsubpassCount()Returns the value of thesubpassCountfield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
VkRenderPassCreateInfo
public VkRenderPassCreateInfo(java.nio.ByteBuffer container)
Creates aVkRenderPassCreateInfoinstance 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()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
flags
public int flags()
Returns the value of theflagsfield.
-
attachmentCount
public int attachmentCount()
Returns the value of theattachmentCountfield.
-
pAttachments
@Nullable public VkAttachmentDescription.Buffer pAttachments()
Returns aVkAttachmentDescription.Bufferview of the struct array pointed to by thepAttachmentsfield.
-
subpassCount
public int subpassCount()
Returns the value of thesubpassCountfield.
-
pSubpasses
public VkSubpassDescription.Buffer pSubpasses()
Returns aVkSubpassDescription.Bufferview of the struct array pointed to by thepSubpassesfield.
-
dependencyCount
public int dependencyCount()
Returns the value of thedependencyCountfield.
-
pDependencies
@Nullable public VkSubpassDependency.Buffer pDependencies()
Returns aVkSubpassDependency.Bufferview of the struct array pointed to by thepDependenciesfield.
-
sType
public VkRenderPassCreateInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkRenderPassCreateInfo pNext(long value)
Sets the specified value to thepNextfield.
-
flags
public VkRenderPassCreateInfo flags(int value)
Sets the specified value to theflagsfield.
-
pAttachments
public VkRenderPassCreateInfo pAttachments(@Nullable VkAttachmentDescription.Buffer value)
Sets the address of the specifiedVkAttachmentDescription.Bufferto thepAttachmentsfield.
-
pSubpasses
public VkRenderPassCreateInfo pSubpasses(VkSubpassDescription.Buffer value)
Sets the address of the specifiedVkSubpassDescription.Bufferto thepSubpassesfield.
-
pDependencies
public VkRenderPassCreateInfo pDependencies(@Nullable VkSubpassDependency.Buffer value)
Sets the address of the specifiedVkSubpassDependency.Bufferto thepDependenciesfield.
-
set
public VkRenderPassCreateInfo set(int sType, long pNext, int flags, @Nullable VkAttachmentDescription.Buffer pAttachments, VkSubpassDescription.Buffer pSubpasses, @Nullable VkSubpassDependency.Buffer pDependencies)
Initializes this struct with the specified values.
-
set
public VkRenderPassCreateInfo set(VkRenderPassCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkRenderPassCreateInfo malloc()
Returns a newVkRenderPassCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkRenderPassCreateInfo calloc()
Returns a newVkRenderPassCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkRenderPassCreateInfo create()
Returns a newVkRenderPassCreateInfoinstance allocated withBufferUtils.
-
create
public static VkRenderPassCreateInfo create(long address)
Returns a newVkRenderPassCreateInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VkRenderPassCreateInfo createSafe(long address)
-
malloc
public static VkRenderPassCreateInfo.Buffer malloc(int capacity)
Returns a newVkRenderPassCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkRenderPassCreateInfo.Buffer calloc(int capacity)
Returns a newVkRenderPassCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkRenderPassCreateInfo.Buffer create(int capacity)
Returns a newVkRenderPassCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkRenderPassCreateInfo.Buffer create(long address, int capacity)
Create aVkRenderPassCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkRenderPassCreateInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkRenderPassCreateInfo mallocStack()
Returns a newVkRenderPassCreateInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkRenderPassCreateInfo callocStack()
Returns a newVkRenderPassCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkRenderPassCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkRenderPassCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkRenderPassCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkRenderPassCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkRenderPassCreateInfo.Buffer callocStack(int capacity)
Returns a newVkRenderPassCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkRenderPassCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkRenderPassCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassCreateInfo.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().
-
nflags
public static int nflags(long struct)
Unsafe version offlags().
-
nattachmentCount
public static int nattachmentCount(long struct)
Unsafe version ofattachmentCount().
-
npAttachments
@Nullable public static VkAttachmentDescription.Buffer npAttachments(long struct)
Unsafe version ofpAttachments().
-
nsubpassCount
public static int nsubpassCount(long struct)
Unsafe version ofsubpassCount().
-
npSubpasses
public static VkSubpassDescription.Buffer npSubpasses(long struct)
Unsafe version ofpSubpasses().
-
ndependencyCount
public static int ndependencyCount(long struct)
Unsafe version ofdependencyCount().
-
npDependencies
@Nullable public static VkSubpassDependency.Buffer npDependencies(long struct)
Unsafe version ofpDependencies().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nflags
public static void nflags(long struct, int value)Unsafe version offlags.
-
nattachmentCount
public static void nattachmentCount(long struct, int value)Sets the specified value to theattachmentCountfield of the specifiedstruct.
-
npAttachments
public static void npAttachments(long struct, @Nullable VkAttachmentDescription.Buffer value)Unsafe version ofpAttachments.
-
nsubpassCount
public static void nsubpassCount(long struct, int value)Sets the specified value to thesubpassCountfield of the specifiedstruct.
-
npSubpasses
public static void npSubpasses(long struct, VkSubpassDescription.Buffer value)Unsafe version ofpSubpasses.
-
ndependencyCount
public static void ndependencyCount(long struct, int value)Sets the specified value to thedependencyCountfield of the specifiedstruct.
-
npDependencies
public static void npDependencies(long struct, @Nullable VkSubpassDependency.Buffer value)Unsafe version ofpDependencies.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
validate
public static void validate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-