Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkSubpassDependency

extends Struct<VkSubpassDependency>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure specifying a subpass dependency.
Description

If srcSubpass is equal to dstSubpass then the VkSubpassDependency does not directly define a dependency. Instead, it enables pipeline barriers to be used in a render pass instance within the identified subpass, where the scopes of one pipeline barrier must be a subset of those described by one subpass dependency. Subpass dependencies specified in this way that include framebuffer-space stages in the srcStageMask must only include framebuffer-space stages in dstStageMask, and must include DEPENDENCY_BY_REGION_BIT. When a subpass dependency is specified in this way for a subpass that has more than one view in its view mask, its dependencyFlags must include DEPENDENCY_VIEW_LOCAL_BIT.

If srcSubpass and dstSubpass are not equal, when a render pass instance which includes a subpass dependency is submitted to a queue, it defines a 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, and 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 accesses 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 accesses 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.

Note

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:

Valid Usage
Valid Usage (Implicit)
See Also

VkRenderPassCreateInfo

Layout


struct VkSubpassDependency {
    uint32_t srcSubpass;
    uint32_t dstSubpass;
    VkPipelineStageFlags srcStageMask;
    VkPipelineStageFlags dstStageMask;
    VkAccessFlags srcAccessMask;
    VkAccessFlags dstAccessMask;
    VkDependencyFlags dependencyFlags;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
DEPENDENCYFLAGS

The struct member offsets.

public static final int
DSTACCESSMASK

The struct member offsets.

public static final int
DSTSTAGEMASK

The struct member offsets.

public static final int
DSTSUBPASS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
SRCACCESSMASK

The struct member offsets.

public static final int
SRCSTAGEMASK

The struct member offsets.

public static final int
SRCSUBPASS

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VkSubpassDependency(long address, ByteBuffer container)

public
VkSubpassDependency(ByteBuffer container)

Creates a VkSubpassDependency instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static VkSubpassDependency
calloc()

Returns a new VkSubpassDependency instance allocated with memCalloc.

public static VkSubpassDependency.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkSubpassDependency.Buffer instance allocated with memCalloc.

public static VkSubpassDependency
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkSubpassDependency instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkSubpassDependency.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkSubpassDependency.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkSubpassDependency
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkSubpassDependency
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkSubpassDependency.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkSubpassDependency.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected VkSubpassDependency
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkSubpassDependency
create()

Returns a new VkSubpassDependency instance allocated with BufferUtils.

public static VkSubpassDependency
create(long address)

Returns a new VkSubpassDependency instance for the specified memory address.

public static VkSubpassDependency.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkSubpassDependency.Buffer instance allocated with BufferUtils.

public static VkSubpassDependency.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkSubpassDependency.Buffer instance at the specified memory.

public static VkSubpassDependency
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkSubpassDependency.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int
dependencyFlags()

a bitmask of VkDependencyFlagBits.

public VkSubpassDependency
dependencyFlags(int value)

Sets the specified value to the dependencyFlags field.

public int
dstAccessMask()

a bitmask of VkAccessFlagBits specifying a destination access mask.

public VkSubpassDependency
dstAccessMask(int value)

Sets the specified value to the dstAccessMask field.

public int
dstStageMask()

a bitmask of VkPipelineStageFlagBits specifying the destination stage mask

public VkSubpassDependency
dstStageMask(int value)

Sets the specified value to the dstStageMask field.

public int
dstSubpass()

the subpass index of the second subpass in the dependency, or SUBPASS_EXTERNAL.

public VkSubpassDependency
dstSubpass(int value)

Sets the specified value to the dstSubpass field.

public static VkSubpassDependency
malloc()

Returns a new VkSubpassDependency instance allocated with memAlloc.

public static VkSubpassDependency.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkSubpassDependency.Buffer instance allocated with memAlloc.

public static VkSubpassDependency
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkSubpassDependency instance allocated on the specified MemoryStack.

public static VkSubpassDependency.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkSubpassDependency.Buffer instance allocated on the specified MemoryStack.

public static VkSubpassDependency
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkSubpassDependency
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkSubpassDependency.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkSubpassDependency.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static int
ndependencyFlags(long struct)

Unsafe version of dependencyFlags.

public static void
ndependencyFlags(long struct, int value)

Unsafe version of dependencyFlags.

public static int
ndstAccessMask(long struct)

Unsafe version of dstAccessMask.

public static void
ndstAccessMask(long struct, int value)

Unsafe version of dstAccessMask.

public static int
ndstStageMask(long struct)

Unsafe version of dstStageMask.

public static void
ndstStageMask(long struct, int value)

Unsafe version of dstStageMask.

public static int
ndstSubpass(long struct)

Unsafe version of dstSubpass.

public static void
ndstSubpass(long struct, int value)

Unsafe version of dstSubpass.

public static int
nsrcAccessMask(long struct)

Unsafe version of srcAccessMask.

public static void
nsrcAccessMask(long struct, int value)

Unsafe version of srcAccessMask.

public static int
nsrcStageMask(long struct)

Unsafe version of srcStageMask.

public static void
nsrcStageMask(long struct, int value)

Unsafe version of srcStageMask.

public static int
nsrcSubpass(long struct)

Unsafe version of srcSubpass.

public static void
nsrcSubpass(long struct, int value)

Unsafe version of srcSubpass.

public VkSubpassDependency
set(int srcSubpass, int dstSubpass, int srcStageMask, int dstStageMask, int srcAccessMask, int dstAccessMask, int dependencyFlags)

Initializes this struct with the specified values.

public VkSubpassDependency

Returns:

this struct
set
(VkSubpassDependency
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
srcAccessMask()

a bitmask of VkAccessFlagBits specifying a source access mask.

public VkSubpassDependency
srcAccessMask(int value)

Sets the specified value to the srcAccessMask field.

public int
srcStageMask()

a bitmask of VkPipelineStageFlagBits specifying the source stage mask.

public VkSubpassDependency
srcStageMask(int value)

Sets the specified value to the srcStageMask field.

public int
srcSubpass()

the subpass index of the first subpass in the dependency, or SUBPASS_EXTERNAL.

public VkSubpassDependency
srcSubpass(int value)

Sets the specified value to the srcSubpass field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate