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.NativeResource
Structure 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
attachment
member of any element ofpInputAttachments
,pColorAttachments
,pResolveAttachments
orpDepthStencilAttachment
, or any element ofpPreserveAttachments
in any element ofpSubpasses
is notATTACHMENT_UNUSED
, it must be less thanattachmentCount
- For any member of
pAttachments
with aloadOp
equal toATTACHMENT_LOAD_OP_CLEAR
, the first use of that attachment must not specify alayout
equal toIMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
orIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
. - For any member of
pAttachments
with astencilLoadOp
equal toATTACHMENT_LOAD_OP_CLEAR
, the first use of that attachment must not specify alayout
equal toIMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
orIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
. - For any member of
pAttachments
with aloadOp
equal toATTACHMENT_LOAD_OP_CLEAR
, the first use of that attachment must not specify alayout
equal toIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
. - For any member of
pAttachments
with astencilLoadOp
equal toATTACHMENT_LOAD_OP_CLEAR
, the first use of that attachment must not specify alayout
equal toIMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
. - If the
pNext
chain includes an instance ofVkRenderPassInputAttachmentAspectCreateInfo
, thesubpass
member of each element of itspAspectReferences
member must be less thansubpassCount
- If the
pNext
chain includes an instance ofVkRenderPassInputAttachmentAspectCreateInfo
, theinputAttachmentIndex
member of each element of itspAspectReferences
member must be less than the value ofinputAttachmentCount
in the member ofpSubpasses
identified by itssubpass
member - If the
pNext
chain includes an instance ofVkRenderPassInputAttachmentAspectCreateInfo
, for any element of thepInputAttachments
member of any element ofpSubpasses
where theattachment
member is notATTACHMENT_UNUSED
, theaspectMask
member of the corresponding element ofVkRenderPassInputAttachmentAspectCreateInfo
::pAspectReferences
must only include aspects that are present in images of the format specified by the element ofpAttachments
atattachment
- If the
pNext
chain includes an instance ofVkRenderPassMultiviewCreateInfo
, and itssubpassCount
member is not zero, that member must be equal to the value ofsubpassCount
- If the
pNext
chain includes an instance ofVkRenderPassMultiviewCreateInfo
, if itsdependencyCount
member is not zero, it must be equal todependencyCount
- If the
pNext
chain includes an instance ofVkRenderPassMultiviewCreateInfo
, for each non-zero element ofpViewOffsets
, thesrcSubpass
anddstSubpass
members ofpDependencies
at the same index must not be equal - If the
pNext
chain includes an instance ofVkRenderPassMultiviewCreateInfo
, for any element ofpDependencies
with adependencyFlags
member that does not includeDEPENDENCY_VIEW_LOCAL_BIT
, the corresponding element of thepViewOffsets
member of thatVkRenderPassMultiviewCreateInfo
instance must be 0 - If the
pNext
chain includes an instance ofVkRenderPassMultiviewCreateInfo
, elements of itspViewMasks
member must either all be 0, or all not be 0 - If the
pNext
chain includes an instance ofVkRenderPassMultiviewCreateInfo
, and each element of itspViewMasks
member is 0, thedependencyFlags
member of each element ofpDependencies
must not includeDEPENDENCY_VIEW_LOCAL_BIT
- If the
pNext
chain includes an instance ofVkRenderPassMultiviewCreateInfo
, and each element of itspViewMasks
member is 0,correlatedViewMaskCount
must be 0 - If the
pNext
chain includes an instance ofVkRenderPassMultiviewCreateInfo
, each element of itspViewMask
member must not have a bit set at an index greater than or equal toVkPhysicalDeviceLimits
::maxFramebufferLayers
- For any element of
pDependencies
, if thesrcSubpass
is notSUBPASS_EXTERNAL
, all stage flags included in thesrcStageMask
member of that dependency must be a pipeline stage supported by the pipeline identified by thepipelineBindPoint
member of the source subpass - For any element of
pDependencies
, if thedstSubpass
is notSUBPASS_EXTERNAL
, all stage flags included in thedstStageMask
member of that dependency must be a pipeline stage supported by the pipeline identified by thepipelineBindPoint
member of the destination subpass - The
srcSubpass
member of each element ofpDependencies
must be less thansubpassCount
- The
dstSubpass
member of each element ofpDependencies
must be less thansubpassCount
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofVkRenderPassFragmentDensityMapCreateInfoEXT
,VkRenderPassInputAttachmentAspectCreateInfo
, orVkRenderPassMultiviewCreateInfo
- Each
sType
member in thepNext
chain must be unique - If
attachmentCount
is not 0,pAttachments
must be a valid pointer to an array ofattachmentCount
validVkAttachmentDescription
structures pSubpasses
must be a valid pointer to an array ofsubpassCount
validVkSubpassDescription
structures- If
dependencyCount
is not 0,pDependencies
must be a valid pointer to an array ofdependencyCount
validVkSubpassDependency
structures subpassCount
must be greater than 0
See Also
VkAttachmentDescription
,VkSubpassDependency
,VkSubpassDescription
,CreateRenderPass
Member documentation
sType
– the type of this structure.pNext
–NULL
or 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 ofattachmentCount
VkAttachmentDescription
structures describing the attachments used by the render pass.subpassCount
– the number of subpasses to create.pSubpasses
– points to an array ofsubpassCount
VkSubpassDescription
structures describing each subpass.dependencyCount
– the number of memory dependencies between pairs of subpasses.pDependencies
– points to an array ofdependencyCount
VkSubpassDependency
structures describing dependencies between pairs of subpasses.
Layout
struct VkRenderPassCreateInfo { VkStructureType sType; void const * pNext; VkRenderPassCreateFlags flags; uint32_t attachmentCount;
VkAttachmentDescription
const * pAttachments; uint32_t subpassCount;VkSubpassDescription
const * pSubpasses; uint32_t dependencyCount;VkSubpassDependency
const * pDependencies; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkRenderPassCreateInfo.Buffer
An array ofVkRenderPassCreateInfo
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ATTACHMENTCOUNT
DEPENDENCYCOUNT
FLAGS
PATTACHMENTS
PDEPENDENCIES
PNEXT
PSUBPASSESThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
SUBPASSCOUNTThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkRenderPassCreateInfo(java.nio.ByteBuffer container)
Creates aVkRenderPassCreateInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
attachmentCount()
Returns the value of theattachmentCount
field.static VkRenderPassCreateInfo
calloc()
Returns a newVkRenderPassCreateInfo
instance allocated withmemCalloc
.static VkRenderPassCreateInfo.Buffer
calloc(int capacity)
Returns a newVkRenderPassCreateInfo.Buffer
instance allocated withmemCalloc
.static VkRenderPassCreateInfo
callocStack()
Returns a newVkRenderPassCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkRenderPassCreateInfo.Buffer
callocStack(int capacity)
Returns a newVkRenderPassCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkRenderPassCreateInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkRenderPassCreateInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkRenderPassCreateInfo
create()
Returns a newVkRenderPassCreateInfo
instance allocated withBufferUtils
.static VkRenderPassCreateInfo.Buffer
create(int capacity)
Returns a newVkRenderPassCreateInfo.Buffer
instance allocated withBufferUtils
.static VkRenderPassCreateInfo
create(long address)
Returns a newVkRenderPassCreateInfo
instance for the specified memory address.static VkRenderPassCreateInfo.Buffer
create(long address, int capacity)
Create aVkRenderPassCreateInfo.Buffer
instance at the specified memory.static VkRenderPassCreateInfo
createSafe(long address)
static VkRenderPassCreateInfo.Buffer
createSafe(long address, int capacity)
int
dependencyCount()
Returns the value of thedependencyCount
field.int
flags()
Returns the value of theflags
field.VkRenderPassCreateInfo
flags(int value)
Sets the specified value to theflags
field.static VkRenderPassCreateInfo
malloc()
Returns a newVkRenderPassCreateInfo
instance allocated withmemAlloc
.static VkRenderPassCreateInfo.Buffer
malloc(int capacity)
Returns a newVkRenderPassCreateInfo.Buffer
instance allocated withmemAlloc
.static VkRenderPassCreateInfo
mallocStack()
Returns a newVkRenderPassCreateInfo
instance allocated on the thread-localMemoryStack
.static VkRenderPassCreateInfo.Buffer
mallocStack(int capacity)
Returns a newVkRenderPassCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkRenderPassCreateInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkRenderPassCreateInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassCreateInfo
instance allocated on the specifiedMemoryStack
.static int
nattachmentCount(long struct)
Unsafe version ofattachmentCount()
.static void
nattachmentCount(long struct, int value)
Sets the specified value to theattachmentCount
field of the specifiedstruct
.static int
ndependencyCount(long struct)
Unsafe version ofdependencyCount()
.static void
ndependencyCount(long struct, int value)
Sets the specified value to thedependencyCount
field of the specifiedstruct
.static int
nflags(long struct)
Unsafe version offlags()
.static void
nflags(long struct, int value)
Unsafe version offlags
.static VkAttachmentDescription.Buffer
npAttachments(long struct)
Unsafe version ofpAttachments()
.static void
npAttachments(long struct, VkAttachmentDescription.Buffer value)
Unsafe version ofpAttachments
.static VkSubpassDependency.Buffer
npDependencies(long struct)
Unsafe version ofpDependencies()
.static void
npDependencies(long struct, VkSubpassDependency.Buffer value)
Unsafe version ofpDependencies
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static VkSubpassDescription.Buffer
npSubpasses(long struct)
Unsafe version ofpSubpasses()
.static void
npSubpasses(long struct, VkSubpassDescription.Buffer value)
Unsafe version ofpSubpasses
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.static int
nsubpassCount(long struct)
Unsafe version ofsubpassCount()
.static void
nsubpassCount(long struct, int value)
Sets the specified value to thesubpassCount
field of the specifiedstruct
.VkAttachmentDescription.Buffer
pAttachments()
Returns aVkAttachmentDescription.Buffer
view of the struct array pointed to by thepAttachments
field.VkRenderPassCreateInfo
pAttachments(VkAttachmentDescription.Buffer value)
Sets the address of the specifiedVkAttachmentDescription.Buffer
to thepAttachments
field.VkSubpassDependency.Buffer
pDependencies()
Returns aVkSubpassDependency.Buffer
view of the struct array pointed to by thepDependencies
field.VkRenderPassCreateInfo
pDependencies(VkSubpassDependency.Buffer value)
Sets the address of the specifiedVkSubpassDependency.Buffer
to thepDependencies
field.long
pNext()
Returns the value of thepNext
field.VkRenderPassCreateInfo
pNext(long value)
Sets the specified value to thepNext
field.VkSubpassDescription.Buffer
pSubpasses()
Returns aVkSubpassDescription.Buffer
view of the struct array pointed to by thepSubpasses
field.VkRenderPassCreateInfo
pSubpasses(VkSubpassDescription.Buffer value)
Sets the address of the specifiedVkSubpassDescription.Buffer
to thepSubpasses
field.VkRenderPassCreateInfo
set(int sType, long pNext, int flags, VkAttachmentDescription.Buffer pAttachments, VkSubpassDescription.Buffer pSubpasses, VkSubpassDependency.Buffer pDependencies)
Initializes this struct with the specified values.VkRenderPassCreateInfo
set(VkRenderPassCreateInfo src)
Copies the specified struct data to this struct.int
sizeof()
int
sType()
Returns the value of thesType
field.VkRenderPassCreateInfo
sType(int value)
Sets the specified value to thesType
field.int
subpassCount()
Returns the value of thesubpassCount
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(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 aVkRenderPassCreateInfo
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
attachmentCount
public int attachmentCount()
Returns the value of theattachmentCount
field.
-
pAttachments
@Nullable public VkAttachmentDescription.Buffer pAttachments()
Returns aVkAttachmentDescription.Buffer
view of the struct array pointed to by thepAttachments
field.
-
subpassCount
public int subpassCount()
Returns the value of thesubpassCount
field.
-
pSubpasses
public VkSubpassDescription.Buffer pSubpasses()
Returns aVkSubpassDescription.Buffer
view of the struct array pointed to by thepSubpasses
field.
-
dependencyCount
public int dependencyCount()
Returns the value of thedependencyCount
field.
-
pDependencies
@Nullable public VkSubpassDependency.Buffer pDependencies()
Returns aVkSubpassDependency.Buffer
view of the struct array pointed to by thepDependencies
field.
-
sType
public VkRenderPassCreateInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkRenderPassCreateInfo pNext(long value)
Sets the specified value to thepNext
field.
-
flags
public VkRenderPassCreateInfo flags(int value)
Sets the specified value to theflags
field.
-
pAttachments
public VkRenderPassCreateInfo pAttachments(@Nullable VkAttachmentDescription.Buffer value)
Sets the address of the specifiedVkAttachmentDescription.Buffer
to thepAttachments
field.
-
pSubpasses
public VkRenderPassCreateInfo pSubpasses(VkSubpassDescription.Buffer value)
Sets the address of the specifiedVkSubpassDescription.Buffer
to thepSubpasses
field.
-
pDependencies
public VkRenderPassCreateInfo pDependencies(@Nullable VkSubpassDependency.Buffer value)
Sets the address of the specifiedVkSubpassDependency.Buffer
to thepDependencies
field.
-
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 newVkRenderPassCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkRenderPassCreateInfo calloc()
Returns a newVkRenderPassCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkRenderPassCreateInfo create()
Returns a newVkRenderPassCreateInfo
instance allocated withBufferUtils
.
-
create
public static VkRenderPassCreateInfo create(long address)
Returns a newVkRenderPassCreateInfo
instance for the specified memory address.
-
createSafe
@Nullable public static VkRenderPassCreateInfo createSafe(long address)
-
malloc
public static VkRenderPassCreateInfo.Buffer malloc(int capacity)
Returns a newVkRenderPassCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkRenderPassCreateInfo.Buffer calloc(int capacity)
Returns a newVkRenderPassCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkRenderPassCreateInfo.Buffer create(int capacity)
Returns a newVkRenderPassCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkRenderPassCreateInfo.Buffer create(long address, int capacity)
Create aVkRenderPassCreateInfo.Buffer
instance 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 newVkRenderPassCreateInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkRenderPassCreateInfo callocStack()
Returns a newVkRenderPassCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkRenderPassCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkRenderPassCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkRenderPassCreateInfo
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkRenderPassCreateInfo.Buffer callocStack(int capacity)
Returns a newVkRenderPassCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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 theattachmentCount
field 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 thesubpassCount
field 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 thedependencyCount
field 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
-
-