Package org.lwjgl.vulkan
Class VkSubpassDescription
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkSubpassDescription
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkSubpassDescription extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes the subpass that a fragment shader is executed in.
Valid Usage
flags
must be 0pipelineBindPoint
must be a validVkPipelineBindPoint
value- If
inputAttachmentCount
is not 0,pInputAttachments
must be a pointer to an array ofinputAttachmentCount
validVkAttachmentReference
structures - If
colorAttachmentCount
is not 0,pColorAttachments
must be a pointer to an array ofcolorAttachmentCount
validVkAttachmentReference
structures - If
colorAttachmentCount
is not 0, andpResolveAttachments
is notNULL
,pResolveAttachments
must be a pointer to an array ofcolorAttachmentCount
validVkAttachmentReference
structures - If
pDepthStencilAttachment
is notNULL
,pDepthStencilAttachment
must be a pointer to a validVkAttachmentReference
structure - If
preserveAttachmentCount
is not 0,pPreserveAttachments
must be a pointer to an array ofpreserveAttachmentCount
uint32_t
values pipelineBindPoint
must bePIPELINE_BIND_POINT_GRAPHICS
colorCount
must be less than or equal toVkPhysicalDeviceLimits
::maxColorAttachments
- If the first use of an attachment in this render pass is as an input attachment, and the attachment is not also used as a color or depth/stencil
attachment in the same subpass, then
loadOp
must not beATTACHMENT_LOAD_OP_CLEAR
- If
pResolveAttachments
is notNULL
, for each resolve attachment that does not have the valueATTACHMENT_UNUSED
, the corresponding color attachment must not have the valueATTACHMENT_UNUSED
- If
pResolveAttachments
is notNULL
, the sample count of each element ofpColorAttachments
must be anything other thanSAMPLE_COUNT_1_BIT
- Any given element of
pResolveAttachments
must have a sample count ofSAMPLE_COUNT_1_BIT
- Any given element of
pResolveAttachments
must have the sameVkFormat
as its corresponding color attachment - All attachments in
pColorAttachments
andpDepthStencilAttachment
that are notATTACHMENT_UNUSED
must have the same sample count - If any input attachments are
ATTACHMENT_UNUSED
, then any pipelines bound during the subpass must not accesss those input attachments from the fragment shader - The
attachment
member of any element ofpPreserveAttachments
must not beATTACHMENT_UNUSED
- Any given element of
pPreserveAttachments
must not also be an element of any other member of the subpass description - If any attachment is used as both an input attachment and a color or depth/stencil attachment, then each use must use the same
layout
Member documentation
flags
– reserved for future usepipelineBindPoint
– aVkPipelineBindPoint
value specifying whether this is a compute or graphics subpass. Currently, only graphics subpasses are supported. One of:PIPELINE_BIND_POINT_COMPUTE
PIPELINE_BIND_POINT_GRAPHICS
inputAttachmentCount
– the number of input attachmentspInputAttachments
– an array ofVkAttachmentReference
structures that lists which of the render pass’s attachments can be read in the shader during the subpass, and what layout the attachment images will be in during the subpasscolorAttachmentCount
– the number of color attachmentspColorAttachments
– an array ofcolorAttachmentCount
VkAttachmentReference
structures that lists which of the render pass’s attachments will be used as color attachments in the subpass, and what layout the attachment images will be in during the subpasspResolveAttachments
–NULL
or a pointer to an array ofVkAttachmentReference
structures. IfpResolveAttachments
is notNULL
, each of its elements corresponds to a color attachment (the element inpColorAttachments
at the same index)pDepthStencilAttachment
– a pointer to aVkAttachmentReference
specifying which attachment will be used for depth/stencil data and the layout it will be in during the subpasspreserveAttachmentCount
– the number of preserved attachmentspPreserveAttachments
– an array ofpreserveAttachmentCount
render pass attachment indices describing the attachments that are not used by a subpass, but whose contents must be preserved throughout the subpass
Layout
struct VkSubpassDescription { VkSubpassDescriptionFlags flags; VkPipelineBindPoint pipelineBindPoint; uint32_t inputAttachmentCount; const VkAttachmentReference * pInputAttachments; uint32_t colorAttachmentCount; const VkAttachmentReference * pColorAttachments; const VkAttachmentReference * pResolveAttachments; const VkAttachmentReference * pDepthStencilAttachment; uint32_t preserveAttachmentCount; const uint32_t * pPreserveAttachments; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkSubpassDescription.Buffer
An array ofVkSubpassDescription
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkSubpassDescription(java.nio.ByteBuffer container)
Creates aVkSubpassDescription
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkSubpassDescription
calloc()
Returns a newVkSubpassDescription
instance allocated withmemCalloc
.static VkSubpassDescription.Buffer
calloc(int capacity)
Returns a newVkSubpassDescription.Buffer
instance allocated withmemCalloc
.static VkSubpassDescription
callocStack()
Returns a newVkSubpassDescription
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSubpassDescription.Buffer
callocStack(int capacity)
Returns a newVkSubpassDescription.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSubpassDescription.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkSubpassDescription.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSubpassDescription
callocStack(MemoryStack stack)
Returns a newVkSubpassDescription
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
colorAttachmentCount()
Returns the value of thecolorAttachmentCount
field.VkSubpassDescription
colorAttachmentCount(int value)
Sets the specified value to thecolorAttachmentCount
field.static VkSubpassDescription
create()
Returns a newVkSubpassDescription
instance allocated withBufferUtils
.static VkSubpassDescription.Buffer
create(int capacity)
Returns a newVkSubpassDescription.Buffer
instance allocated withBufferUtils
.static VkSubpassDescription
create(long address)
Returns a newVkSubpassDescription
instance for the specified memory address ornull
if the address isNULL
.static VkSubpassDescription.Buffer
create(long address, int capacity)
Create aVkSubpassDescription.Buffer
instance at the specified memory.int
flags()
Returns the value of theflags
field.VkSubpassDescription
flags(int value)
Sets the specified value to theflags
field.int
inputAttachmentCount()
Returns the value of theinputAttachmentCount
field.static VkSubpassDescription
malloc()
Returns a newVkSubpassDescription
instance allocated withmemAlloc
.static VkSubpassDescription.Buffer
malloc(int capacity)
Returns a newVkSubpassDescription.Buffer
instance allocated withmemAlloc
.static VkSubpassDescription
mallocStack()
Returns a newVkSubpassDescription
instance allocated on the thread-localMemoryStack
.static VkSubpassDescription.Buffer
mallocStack(int capacity)
Returns a newVkSubpassDescription.Buffer
instance allocated on the thread-localMemoryStack
.static VkSubpassDescription.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkSubpassDescription.Buffer
instance allocated on the specifiedMemoryStack
.static VkSubpassDescription
mallocStack(MemoryStack stack)
Returns a newVkSubpassDescription
instance allocated on the specifiedMemoryStack
.VkSubpassDescription
nset(long struct)
Unsafe version ofset
.VkAttachmentReference.Buffer
pColorAttachments()
Returns aVkAttachmentReference.Buffer
view of the struct array pointed to by thepColorAttachments
field.VkSubpassDescription
pColorAttachments(VkAttachmentReference.Buffer value)
Sets the address of the specifiedVkAttachmentReference.Buffer
to thepColorAttachments
field.VkAttachmentReference
pDepthStencilAttachment()
Returns aVkAttachmentReference
view of the struct pointed to by thepDepthStencilAttachment
field.VkSubpassDescription
pDepthStencilAttachment(VkAttachmentReference value)
Sets the address of the specifiedVkAttachmentReference
to thepDepthStencilAttachment
field.VkAttachmentReference.Buffer
pInputAttachments()
Returns aVkAttachmentReference.Buffer
view of the struct array pointed to by thepInputAttachments
field.VkSubpassDescription
pInputAttachments(VkAttachmentReference.Buffer value)
Sets the address of the specifiedVkAttachmentReference.Buffer
to thepInputAttachments
field.int
pipelineBindPoint()
Returns the value of thepipelineBindPoint
field.VkSubpassDescription
pipelineBindPoint(int value)
Sets the specified value to thepipelineBindPoint
field.java.nio.IntBuffer
pPreserveAttachments()
Returns aIntBuffer
view of the data pointed to by thepPreserveAttachments
field.VkSubpassDescription
pPreserveAttachments(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to thepPreserveAttachments
field.int
preserveAttachmentCount()
Returns the value of thepreserveAttachmentCount
field.VkAttachmentReference.Buffer
pResolveAttachments()
Returns aVkAttachmentReference.Buffer
view of the struct array pointed to by thepResolveAttachments
field.VkSubpassDescription
pResolveAttachments(VkAttachmentReference.Buffer value)
Sets the address of the specifiedVkAttachmentReference.Buffer
to thepResolveAttachments
field.VkSubpassDescription
set(int flags, int pipelineBindPoint, VkAttachmentReference.Buffer pInputAttachments, int colorAttachmentCount, VkAttachmentReference.Buffer pColorAttachments, VkAttachmentReference.Buffer pResolveAttachments, VkAttachmentReference pDepthStencilAttachment, java.nio.IntBuffer pPreserveAttachments)
Initializes this struct with the specified values.VkSubpassDescription
set(VkSubpassDescription src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
CallsVkSubpassDescription.validate(long)
for each struct contained in the specified struct array.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkSubpassDescription
public VkSubpassDescription(java.nio.ByteBuffer container)
Creates aVkSubpassDescription
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()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
flags
public int flags()
Returns the value of theflags
field.
-
pipelineBindPoint
public int pipelineBindPoint()
Returns the value of thepipelineBindPoint
field.
-
inputAttachmentCount
public int inputAttachmentCount()
Returns the value of theinputAttachmentCount
field.
-
pInputAttachments
public VkAttachmentReference.Buffer pInputAttachments()
Returns aVkAttachmentReference.Buffer
view of the struct array pointed to by thepInputAttachments
field.
-
colorAttachmentCount
public int colorAttachmentCount()
Returns the value of thecolorAttachmentCount
field.
-
pColorAttachments
public VkAttachmentReference.Buffer pColorAttachments()
Returns aVkAttachmentReference.Buffer
view of the struct array pointed to by thepColorAttachments
field.
-
pResolveAttachments
public VkAttachmentReference.Buffer pResolveAttachments()
Returns aVkAttachmentReference.Buffer
view of the struct array pointed to by thepResolveAttachments
field.
-
pDepthStencilAttachment
public VkAttachmentReference pDepthStencilAttachment()
Returns aVkAttachmentReference
view of the struct pointed to by thepDepthStencilAttachment
field.
-
preserveAttachmentCount
public int preserveAttachmentCount()
Returns the value of thepreserveAttachmentCount
field.
-
pPreserveAttachments
public java.nio.IntBuffer pPreserveAttachments()
Returns aIntBuffer
view of the data pointed to by thepPreserveAttachments
field.
-
flags
public VkSubpassDescription flags(int value)
Sets the specified value to theflags
field.
-
pipelineBindPoint
public VkSubpassDescription pipelineBindPoint(int value)
Sets the specified value to thepipelineBindPoint
field.
-
pInputAttachments
public VkSubpassDescription pInputAttachments(VkAttachmentReference.Buffer value)
Sets the address of the specifiedVkAttachmentReference.Buffer
to thepInputAttachments
field.
-
colorAttachmentCount
public VkSubpassDescription colorAttachmentCount(int value)
Sets the specified value to thecolorAttachmentCount
field.
-
pColorAttachments
public VkSubpassDescription pColorAttachments(VkAttachmentReference.Buffer value)
Sets the address of the specifiedVkAttachmentReference.Buffer
to thepColorAttachments
field.
-
pResolveAttachments
public VkSubpassDescription pResolveAttachments(VkAttachmentReference.Buffer value)
Sets the address of the specifiedVkAttachmentReference.Buffer
to thepResolveAttachments
field.
-
pDepthStencilAttachment
public VkSubpassDescription pDepthStencilAttachment(VkAttachmentReference value)
Sets the address of the specifiedVkAttachmentReference
to thepDepthStencilAttachment
field.
-
pPreserveAttachments
public VkSubpassDescription pPreserveAttachments(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to thepPreserveAttachments
field.
-
set
public VkSubpassDescription set(int flags, int pipelineBindPoint, VkAttachmentReference.Buffer pInputAttachments, int colorAttachmentCount, VkAttachmentReference.Buffer pColorAttachments, VkAttachmentReference.Buffer pResolveAttachments, VkAttachmentReference pDepthStencilAttachment, java.nio.IntBuffer pPreserveAttachments)
Initializes this struct with the specified values.
-
nset
public VkSubpassDescription nset(long struct)
Unsafe version ofset
.
-
set
public VkSubpassDescription set(VkSubpassDescription src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkSubpassDescription malloc()
Returns a newVkSubpassDescription
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkSubpassDescription calloc()
Returns a newVkSubpassDescription
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkSubpassDescription create()
Returns a newVkSubpassDescription
instance allocated withBufferUtils
.
-
create
public static VkSubpassDescription create(long address)
Returns a newVkSubpassDescription
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkSubpassDescription.Buffer malloc(int capacity)
Returns a newVkSubpassDescription.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkSubpassDescription.Buffer calloc(int capacity)
Returns a newVkSubpassDescription.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSubpassDescription.Buffer create(int capacity)
Returns a newVkSubpassDescription.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSubpassDescription.Buffer create(long address, int capacity)
Create aVkSubpassDescription.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkSubpassDescription mallocStack()
Returns a newVkSubpassDescription
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkSubpassDescription callocStack()
Returns a newVkSubpassDescription
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkSubpassDescription mallocStack(MemoryStack stack)
Returns a newVkSubpassDescription
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkSubpassDescription callocStack(MemoryStack stack)
Returns a newVkSubpassDescription
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkSubpassDescription.Buffer mallocStack(int capacity)
Returns a newVkSubpassDescription.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkSubpassDescription.Buffer callocStack(int capacity)
Returns a newVkSubpassDescription.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkSubpassDescription.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkSubpassDescription.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkSubpassDescription.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkSubpassDescription.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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)
CallsVkSubpassDescription.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-