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
flagsmust be 0pipelineBindPointmust be a validVkPipelineBindPointvalue- If
inputAttachmentCountis not 0,pInputAttachmentsmust be a pointer to an array ofinputAttachmentCountvalidVkAttachmentReferencestructures - If
colorAttachmentCountis not 0,pColorAttachmentsmust be a pointer to an array ofcolorAttachmentCountvalidVkAttachmentReferencestructures - If
colorAttachmentCountis not 0, andpResolveAttachmentsis notNULL,pResolveAttachmentsmust be a pointer to an array ofcolorAttachmentCountvalidVkAttachmentReferencestructures - If
pDepthStencilAttachmentis notNULL,pDepthStencilAttachmentmust be a pointer to a validVkAttachmentReferencestructure - If
preserveAttachmentCountis not 0,pPreserveAttachmentsmust be a pointer to an array ofpreserveAttachmentCountuint32_tvalues pipelineBindPointmust bePIPELINE_BIND_POINT_GRAPHICScolorCountmust 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
loadOpmust not beATTACHMENT_LOAD_OP_CLEAR - If
pResolveAttachmentsis notNULL, for each resolve attachment that does not have the valueATTACHMENT_UNUSED, the corresponding color attachment must not have the valueATTACHMENT_UNUSED - If
pResolveAttachmentsis notNULL, the sample count of each element ofpColorAttachmentsmust be anything other thanSAMPLE_COUNT_1_BIT - Any given element of
pResolveAttachmentsmust have a sample count ofSAMPLE_COUNT_1_BIT - Any given element of
pResolveAttachmentsmust have the sameVkFormatas its corresponding color attachment - All attachments in
pColorAttachmentsandpDepthStencilAttachmentthat are notATTACHMENT_UNUSEDmust 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
attachmentmember of any element ofpPreserveAttachmentsmust not beATTACHMENT_UNUSED - Any given element of
pPreserveAttachmentsmust 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– aVkPipelineBindPointvalue specifying whether this is a compute or graphics subpass. Currently, only graphics subpasses are supported. One of:PIPELINE_BIND_POINT_COMPUTEPIPELINE_BIND_POINT_GRAPHICSinputAttachmentCount– the number of input attachmentspInputAttachments– an array ofVkAttachmentReferencestructures 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 ofcolorAttachmentCountVkAttachmentReferencestructures 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–NULLor a pointer to an array ofVkAttachmentReferencestructures. IfpResolveAttachmentsis notNULL, each of its elements corresponds to a color attachment (the element inpColorAttachmentsat the same index)pDepthStencilAttachment– a pointer to aVkAttachmentReferencespecifying 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 ofpreserveAttachmentCountrender 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 classVkSubpassDescription.BufferAn array ofVkSubpassDescriptionstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe 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 aVkSubpassDescriptioninstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkSubpassDescriptioncalloc()Returns a newVkSubpassDescriptioninstance allocated withmemCalloc.static VkSubpassDescription.Buffercalloc(int capacity)Returns a newVkSubpassDescription.Bufferinstance allocated withmemCalloc.static VkSubpassDescriptioncallocStack()Returns a newVkSubpassDescriptioninstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSubpassDescription.BuffercallocStack(int capacity)Returns a newVkSubpassDescription.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSubpassDescription.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkSubpassDescription.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSubpassDescriptioncallocStack(MemoryStack stack)Returns a newVkSubpassDescriptioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcolorAttachmentCount()Returns the value of thecolorAttachmentCountfield.VkSubpassDescriptioncolorAttachmentCount(int value)Sets the specified value to thecolorAttachmentCountfield.static VkSubpassDescriptioncreate()Returns a newVkSubpassDescriptioninstance allocated withBufferUtils.static VkSubpassDescription.Buffercreate(int capacity)Returns a newVkSubpassDescription.Bufferinstance allocated withBufferUtils.static VkSubpassDescriptioncreate(long address)Returns a newVkSubpassDescriptioninstance for the specified memory address ornullif the address isNULL.static VkSubpassDescription.Buffercreate(long address, int capacity)Create aVkSubpassDescription.Bufferinstance at the specified memory.intflags()Returns the value of theflagsfield.VkSubpassDescriptionflags(int value)Sets the specified value to theflagsfield.intinputAttachmentCount()Returns the value of theinputAttachmentCountfield.static VkSubpassDescriptionmalloc()Returns a newVkSubpassDescriptioninstance allocated withmemAlloc.static VkSubpassDescription.Buffermalloc(int capacity)Returns a newVkSubpassDescription.Bufferinstance allocated withmemAlloc.static VkSubpassDescriptionmallocStack()Returns a newVkSubpassDescriptioninstance allocated on the thread-localMemoryStack.static VkSubpassDescription.BuffermallocStack(int capacity)Returns a newVkSubpassDescription.Bufferinstance allocated on the thread-localMemoryStack.static VkSubpassDescription.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkSubpassDescription.Bufferinstance allocated on the specifiedMemoryStack.static VkSubpassDescriptionmallocStack(MemoryStack stack)Returns a newVkSubpassDescriptioninstance allocated on the specifiedMemoryStack.VkSubpassDescriptionnset(long struct)Unsafe version ofset.VkAttachmentReference.BufferpColorAttachments()Returns aVkAttachmentReference.Bufferview of the struct array pointed to by thepColorAttachmentsfield.VkSubpassDescriptionpColorAttachments(VkAttachmentReference.Buffer value)Sets the address of the specifiedVkAttachmentReference.Bufferto thepColorAttachmentsfield.VkAttachmentReferencepDepthStencilAttachment()Returns aVkAttachmentReferenceview of the struct pointed to by thepDepthStencilAttachmentfield.VkSubpassDescriptionpDepthStencilAttachment(VkAttachmentReference value)Sets the address of the specifiedVkAttachmentReferenceto thepDepthStencilAttachmentfield.VkAttachmentReference.BufferpInputAttachments()Returns aVkAttachmentReference.Bufferview of the struct array pointed to by thepInputAttachmentsfield.VkSubpassDescriptionpInputAttachments(VkAttachmentReference.Buffer value)Sets the address of the specifiedVkAttachmentReference.Bufferto thepInputAttachmentsfield.intpipelineBindPoint()Returns the value of thepipelineBindPointfield.VkSubpassDescriptionpipelineBindPoint(int value)Sets the specified value to thepipelineBindPointfield.java.nio.IntBufferpPreserveAttachments()Returns aIntBufferview of the data pointed to by thepPreserveAttachmentsfield.VkSubpassDescriptionpPreserveAttachments(java.nio.IntBuffer value)Sets the address of the specifiedIntBufferto thepPreserveAttachmentsfield.intpreserveAttachmentCount()Returns the value of thepreserveAttachmentCountfield.VkAttachmentReference.BufferpResolveAttachments()Returns aVkAttachmentReference.Bufferview of the struct array pointed to by thepResolveAttachmentsfield.VkSubpassDescriptionpResolveAttachments(VkAttachmentReference.Buffer value)Sets the address of the specifiedVkAttachmentReference.Bufferto thepResolveAttachmentsfield.VkSubpassDescriptionset(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.VkSubpassDescriptionset(VkSubpassDescription src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(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 aVkSubpassDescriptioninstance 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()
Description copied from class:StructReturns thesizeof(struct).
-
flags
public int flags()
Returns the value of theflagsfield.
-
pipelineBindPoint
public int pipelineBindPoint()
Returns the value of thepipelineBindPointfield.
-
inputAttachmentCount
public int inputAttachmentCount()
Returns the value of theinputAttachmentCountfield.
-
pInputAttachments
public VkAttachmentReference.Buffer pInputAttachments()
Returns aVkAttachmentReference.Bufferview of the struct array pointed to by thepInputAttachmentsfield.
-
colorAttachmentCount
public int colorAttachmentCount()
Returns the value of thecolorAttachmentCountfield.
-
pColorAttachments
public VkAttachmentReference.Buffer pColorAttachments()
Returns aVkAttachmentReference.Bufferview of the struct array pointed to by thepColorAttachmentsfield.
-
pResolveAttachments
public VkAttachmentReference.Buffer pResolveAttachments()
Returns aVkAttachmentReference.Bufferview of the struct array pointed to by thepResolveAttachmentsfield.
-
pDepthStencilAttachment
public VkAttachmentReference pDepthStencilAttachment()
Returns aVkAttachmentReferenceview of the struct pointed to by thepDepthStencilAttachmentfield.
-
preserveAttachmentCount
public int preserveAttachmentCount()
Returns the value of thepreserveAttachmentCountfield.
-
pPreserveAttachments
public java.nio.IntBuffer pPreserveAttachments()
Returns aIntBufferview of the data pointed to by thepPreserveAttachmentsfield.
-
flags
public VkSubpassDescription flags(int value)
Sets the specified value to theflagsfield.
-
pipelineBindPoint
public VkSubpassDescription pipelineBindPoint(int value)
Sets the specified value to thepipelineBindPointfield.
-
pInputAttachments
public VkSubpassDescription pInputAttachments(VkAttachmentReference.Buffer value)
Sets the address of the specifiedVkAttachmentReference.Bufferto thepInputAttachmentsfield.
-
colorAttachmentCount
public VkSubpassDescription colorAttachmentCount(int value)
Sets the specified value to thecolorAttachmentCountfield.
-
pColorAttachments
public VkSubpassDescription pColorAttachments(VkAttachmentReference.Buffer value)
Sets the address of the specifiedVkAttachmentReference.Bufferto thepColorAttachmentsfield.
-
pResolveAttachments
public VkSubpassDescription pResolveAttachments(VkAttachmentReference.Buffer value)
Sets the address of the specifiedVkAttachmentReference.Bufferto thepResolveAttachmentsfield.
-
pDepthStencilAttachment
public VkSubpassDescription pDepthStencilAttachment(VkAttachmentReference value)
Sets the address of the specifiedVkAttachmentReferenceto thepDepthStencilAttachmentfield.
-
pPreserveAttachments
public VkSubpassDescription pPreserveAttachments(java.nio.IntBuffer value)
Sets the address of the specifiedIntBufferto thepPreserveAttachmentsfield.
-
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 newVkSubpassDescriptioninstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkSubpassDescription calloc()
Returns a newVkSubpassDescriptioninstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkSubpassDescription create()
Returns a newVkSubpassDescriptioninstance allocated withBufferUtils.
-
create
public static VkSubpassDescription create(long address)
Returns a newVkSubpassDescriptioninstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkSubpassDescription.Buffer malloc(int capacity)
Returns a newVkSubpassDescription.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkSubpassDescription.Buffer calloc(int capacity)
Returns a newVkSubpassDescription.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkSubpassDescription.Buffer create(int capacity)
Returns a newVkSubpassDescription.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkSubpassDescription.Buffer create(long address, int capacity)
Create aVkSubpassDescription.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkSubpassDescription mallocStack()
Returns a newVkSubpassDescriptioninstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkSubpassDescription callocStack()
Returns a newVkSubpassDescriptioninstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkSubpassDescription mallocStack(MemoryStack stack)
Returns a newVkSubpassDescriptioninstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkSubpassDescription callocStack(MemoryStack stack)
Returns a newVkSubpassDescriptioninstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkSubpassDescription.Buffer callocStack(int capacity)
Returns a newVkSubpassDescription.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkSubpassDescription.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkSubpassDescription.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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
-
-