public class VkSubpassDependency
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
If srcSubpass is equal to dstSubpass then the VkSubpassDependency describes a subpass self-dependency, and only constrains the pipeline barriers allowed within a subpass instance. Otherwise, when a render pass instance which includes a subpass dependency is submitted to a queue, it defines a memory dependency between the subpasses identified by srcSubpass and dstSubpass.
If srcSubpass is equal to SUBPASS_EXTERNAL, the first synchronization scope includes commands that occur earlier in submission order than the CmdBeginRenderPass used to begin the render pass instance. Otherwise, the first set of commands includes all commands submitted as part of the subpass instance identified by srcSubpass and any load, store or multisample resolve operations on attachments used in srcSubpass. In either case, the first synchronization scope is limited to operations on the pipeline stages determined by the source stage mask specified by srcStageMask.
If dstSubpass is equal to SUBPASS_EXTERNAL, the second synchronization scope includes commands that occur later in submission order than the CmdEndRenderPass used to end the render pass instance. Otherwise, the second set of commands includes all commands submitted as part of the subpass instance identified by dstSubpass and any load, store or multisample resolve operations on attachments used in dstSubpass. In either case, the second synchronization scope is limited to operations on the pipeline stages determined by the destination stage mask specified by dstStageMask.
The first access scope is limited to access in the pipeline stages determined by the source stage mask specified by srcStageMask. It is also limited to access types in the source access mask specified by srcAccessMask.
The second access scope is limited to access in the pipeline stages determined by the destination stage mask specified by dstStageMask. It is also limited to access types in the destination access mask specified by dstAccessMask.
The availability and visibility operations defined by a subpass dependency affect the execution of image layout transitions within the render pass.
For non-attachment resources, the memory dependency expressed by subpass dependency is nearly identical to that of a VkMemoryBarrier (with matching srcAccessMask and dstAccessMask parameters) submitted as a part of a CmdPipelineBarrier (with matching srcStageMask and dstStageMask parameters). The only difference being that its scopes are limited to the identified subpasses rather than potentially affecting everything before and after.
For attachments however, subpass dependencies work more like a VkImageMemoryBarrier defined similarly to the VkMemoryBarrier above, the queue family indices set to QUEUE_FAMILY_IGNORED, and layouts as follows:
oldLayout is the attachment’s layout according to the subpass description for srcSubpass.newLayout is the attachment’s layout according to the subpass description for dstSubpass.srcStageMask must not contain PIPELINE_STAGE_GEOMETRY_SHADER_BITdstStageMask must not contain PIPELINE_STAGE_GEOMETRY_SHADER_BITsrcStageMask must not contain PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BITdstStageMask must not contain PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BITsrcSubpass must be less than or equal to dstSubpass, unless one of them is SUBPASS_EXTERNAL, to avoid cyclic dependencies and ensure a valid execution ordersrcSubpass and dstSubpass must not both be equal to SUBPASS_EXTERNALsrcSubpass is equal to dstSubpass and not all of the stages in srcStageMask and dstStageMask are framebuffer-space stages, the logically latest pipeline stage in srcStageMask must be logically earlier than or equal to the logically earliest pipeline stage in dstStageMasksrcAccessMask must be supported by one of the pipeline stages in srcStageMask, as specified in the table of supported access typesdstAccessMask must be supported by one of the pipeline stages in dstStageMask, as specified in the table of supported access typessrcSubpass equals dstSubpass, and srcStageMask and dstStageMask both include a framebuffer-space stage, then dependencyFlags must include DEPENDENCY_BY_REGION_BITdependencyFlags includes DEPENDENCY_VIEW_LOCAL_BIT, srcSubpass must not be equal to SUBPASS_EXTERNALdependencyFlags includes DEPENDENCY_VIEW_LOCAL_BIT, dstSubpass must not be equal to SUBPASS_EXTERNALsrcSubpass equals dstSubpass and that subpass has more than one bit set in the view mask, then dependencyFlags must include DEPENDENCY_VIEW_LOCAL_BITsrcStageMask must not contain PIPELINE_STAGE_MESH_SHADER_BIT_NVsrcStageMask must not contain PIPELINE_STAGE_TASK_SHADER_BIT_NVdstStageMask must not contain PIPELINE_STAGE_MESH_SHADER_BIT_NVdstStageMask must not contain PIPELINE_STAGE_TASK_SHADER_BIT_NVsrcStageMask must be a valid combination of VkPipelineStageFlagBits valuessrcStageMask must not be 0dstStageMask must be a valid combination of VkPipelineStageFlagBits valuesdstStageMask must not be 0srcAccessMask must be a valid combination of VkAccessFlagBits valuesdstAccessMask must be a valid combination of VkAccessFlagBits valuesdependencyFlags must be a valid combination of VkDependencyFlagBits valuessrcSubpass – the subpass index of the first subpass in the dependency, or SUBPASS_EXTERNAL.dstSubpass – the subpass index of the second subpass in the dependency, or SUBPASS_EXTERNAL.srcStageMask – a bitmask of VkPipelineStageFlagBits specifying the source stage mask.dstStageMask – a bitmask of VkPipelineStageFlagBits specifying the destination stage masksrcAccessMask – a bitmask of VkAccessFlagBits specifying a source access mask.dstAccessMask – a bitmask of VkAccessFlagBits specifying a destination access mask.dependencyFlags – a bitmask of VkDependencyFlagBits.
struct VkSubpassDependency {
uint32_t srcSubpass;
uint32_t dstSubpass;
VkPipelineStageFlags srcStageMask;
VkPipelineStageFlags dstStageMask;
VkAccessFlags srcAccessMask;
VkAccessFlags dstAccessMask;
VkDependencyFlags dependencyFlags;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkSubpassDependency.Buffer
An array of
VkSubpassDependency structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DEPENDENCYFLAGS
The struct member offsets.
|
static int |
DSTACCESSMASK
The struct member offsets.
|
static int |
DSTSTAGEMASK
The struct member offsets.
|
static int |
DSTSUBPASS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
SRCACCESSMASK
The struct member offsets.
|
static int |
SRCSTAGEMASK
The struct member offsets.
|
static int |
SRCSUBPASS
The struct member offsets.
|
| Constructor and Description |
|---|
VkSubpassDependency(java.nio.ByteBuffer container)
Creates a
VkSubpassDependency instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkSubpassDependency |
calloc()
Returns a new
VkSubpassDependency instance allocated with memCalloc. |
static VkSubpassDependency.Buffer |
calloc(int capacity)
Returns a new
VkSubpassDependency.Buffer instance allocated with memCalloc. |
static VkSubpassDependency |
callocStack()
Returns a new
VkSubpassDependency instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkSubpassDependency.Buffer |
callocStack(int capacity)
Returns a new
VkSubpassDependency.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkSubpassDependency.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkSubpassDependency.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkSubpassDependency |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkSubpassDependency instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkSubpassDependency |
create()
Returns a new
VkSubpassDependency instance allocated with BufferUtils. |
static VkSubpassDependency.Buffer |
create(int capacity)
Returns a new
VkSubpassDependency.Buffer instance allocated with BufferUtils. |
static VkSubpassDependency |
create(long address)
Returns a new
VkSubpassDependency instance for the specified memory address. |
static VkSubpassDependency.Buffer |
create(long address,
int capacity)
Create a
VkSubpassDependency.Buffer instance at the specified memory. |
static VkSubpassDependency |
createSafe(long address)
|
static VkSubpassDependency.Buffer |
createSafe(long address,
int capacity)
|
int |
dependencyFlags()
Returns the value of the
dependencyFlags field. |
VkSubpassDependency |
dependencyFlags(int value)
Sets the specified value to the
dependencyFlags field. |
int |
dstAccessMask()
Returns the value of the
dstAccessMask field. |
VkSubpassDependency |
dstAccessMask(int value)
Sets the specified value to the
dstAccessMask field. |
int |
dstStageMask()
Returns the value of the
dstStageMask field. |
VkSubpassDependency |
dstStageMask(int value)
Sets the specified value to the
dstStageMask field. |
int |
dstSubpass()
Returns the value of the
dstSubpass field. |
VkSubpassDependency |
dstSubpass(int value)
Sets the specified value to the
dstSubpass field. |
static VkSubpassDependency |
malloc()
Returns a new
VkSubpassDependency instance allocated with memAlloc. |
static VkSubpassDependency.Buffer |
malloc(int capacity)
Returns a new
VkSubpassDependency.Buffer instance allocated with memAlloc. |
static VkSubpassDependency |
mallocStack()
Returns a new
VkSubpassDependency instance allocated on the thread-local MemoryStack. |
static VkSubpassDependency.Buffer |
mallocStack(int capacity)
Returns a new
VkSubpassDependency.Buffer instance allocated on the thread-local MemoryStack. |
static VkSubpassDependency.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkSubpassDependency.Buffer instance allocated on the specified MemoryStack. |
static VkSubpassDependency |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkSubpassDependency instance allocated on the specified MemoryStack. |
static int |
ndependencyFlags(long struct)
Unsafe version of
dependencyFlags(). |
static void |
ndependencyFlags(long struct,
int value)
Unsafe version of
dependencyFlags. |
static int |
ndstAccessMask(long struct)
Unsafe version of
dstAccessMask(). |
static void |
ndstAccessMask(long struct,
int value)
Unsafe version of
dstAccessMask. |
static int |
ndstStageMask(long struct)
Unsafe version of
dstStageMask(). |
static void |
ndstStageMask(long struct,
int value)
Unsafe version of
dstStageMask. |
static int |
ndstSubpass(long struct)
Unsafe version of
dstSubpass(). |
static void |
ndstSubpass(long struct,
int value)
Unsafe version of
dstSubpass. |
static int |
nsrcAccessMask(long struct)
Unsafe version of
srcAccessMask(). |
static void |
nsrcAccessMask(long struct,
int value)
Unsafe version of
srcAccessMask. |
static int |
nsrcStageMask(long struct)
Unsafe version of
srcStageMask(). |
static void |
nsrcStageMask(long struct,
int value)
Unsafe version of
srcStageMask. |
static int |
nsrcSubpass(long struct)
Unsafe version of
srcSubpass(). |
static void |
nsrcSubpass(long struct,
int value)
Unsafe version of
srcSubpass. |
VkSubpassDependency |
set(int srcSubpass,
int dstSubpass,
int srcStageMask,
int dstStageMask,
int srcAccessMask,
int dstAccessMask,
int dependencyFlags)
Initializes this struct with the specified values.
|
VkSubpassDependency |
set(VkSubpassDependency src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
srcAccessMask()
Returns the value of the
srcAccessMask field. |
VkSubpassDependency |
srcAccessMask(int value)
Sets the specified value to the
srcAccessMask field. |
int |
srcStageMask()
Returns the value of the
srcStageMask field. |
VkSubpassDependency |
srcStageMask(int value)
Sets the specified value to the
srcStageMask field. |
int |
srcSubpass()
Returns the value of the
srcSubpass field. |
VkSubpassDependency |
srcSubpass(int value)
Sets the specified value to the
srcSubpass field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int SRCSUBPASS
public static final int DSTSUBPASS
public static final int SRCSTAGEMASK
public static final int DSTSTAGEMASK
public static final int SRCACCESSMASK
public static final int DSTACCESSMASK
public static final int DEPENDENCYFLAGS
public VkSubpassDependency(java.nio.ByteBuffer container)
VkSubpassDependency instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int srcSubpass()
srcSubpass field.public int dstSubpass()
dstSubpass field.public int srcStageMask()
srcStageMask field.public int dstStageMask()
dstStageMask field.public int srcAccessMask()
srcAccessMask field.public int dstAccessMask()
dstAccessMask field.public int dependencyFlags()
dependencyFlags field.public VkSubpassDependency srcSubpass(int value)
srcSubpass field.public VkSubpassDependency dstSubpass(int value)
dstSubpass field.public VkSubpassDependency srcStageMask(int value)
srcStageMask field.public VkSubpassDependency dstStageMask(int value)
dstStageMask field.public VkSubpassDependency srcAccessMask(int value)
srcAccessMask field.public VkSubpassDependency dstAccessMask(int value)
dstAccessMask field.public VkSubpassDependency dependencyFlags(int value)
dependencyFlags field.public VkSubpassDependency set(int srcSubpass, int dstSubpass, int srcStageMask, int dstStageMask, int srcAccessMask, int dstAccessMask, int dependencyFlags)
public VkSubpassDependency set(VkSubpassDependency src)
src - the source structpublic static VkSubpassDependency malloc()
VkSubpassDependency instance allocated with memAlloc. The instance must be explicitly freed.public static VkSubpassDependency calloc()
VkSubpassDependency instance allocated with memCalloc. The instance must be explicitly freed.public static VkSubpassDependency create()
VkSubpassDependency instance allocated with BufferUtils.public static VkSubpassDependency create(long address)
VkSubpassDependency instance for the specified memory address.@Nullable public static VkSubpassDependency createSafe(long address)
public static VkSubpassDependency.Buffer malloc(int capacity)
VkSubpassDependency.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkSubpassDependency.Buffer calloc(int capacity)
VkSubpassDependency.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkSubpassDependency.Buffer create(int capacity)
VkSubpassDependency.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkSubpassDependency.Buffer create(long address, int capacity)
VkSubpassDependency.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkSubpassDependency.Buffer createSafe(long address, int capacity)
public static VkSubpassDependency mallocStack()
VkSubpassDependency instance allocated on the thread-local MemoryStack.public static VkSubpassDependency callocStack()
VkSubpassDependency instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkSubpassDependency mallocStack(org.lwjgl.system.MemoryStack stack)
VkSubpassDependency instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkSubpassDependency callocStack(org.lwjgl.system.MemoryStack stack)
VkSubpassDependency instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkSubpassDependency.Buffer mallocStack(int capacity)
VkSubpassDependency.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkSubpassDependency.Buffer callocStack(int capacity)
VkSubpassDependency.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkSubpassDependency.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkSubpassDependency.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkSubpassDependency.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkSubpassDependency.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nsrcSubpass(long struct)
srcSubpass().public static int ndstSubpass(long struct)
dstSubpass().public static int nsrcStageMask(long struct)
srcStageMask().public static int ndstStageMask(long struct)
dstStageMask().public static int nsrcAccessMask(long struct)
srcAccessMask().public static int ndstAccessMask(long struct)
dstAccessMask().public static int ndependencyFlags(long struct)
dependencyFlags().public static void nsrcSubpass(long struct,
int value)
srcSubpass.public static void ndstSubpass(long struct,
int value)
dstSubpass.public static void nsrcStageMask(long struct,
int value)
srcStageMask.public static void ndstStageMask(long struct,
int value)
dstStageMask.public static void nsrcAccessMask(long struct,
int value)
srcAccessMask.public static void ndstAccessMask(long struct,
int value)
dstAccessMask.public static void ndependencyFlags(long struct,
int value)
dependencyFlags.Copyright LWJGL. All Rights Reserved. License terms.