Class VkSubpassDependency
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkSubpassDependency
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkSubpassDependency extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying a subpass dependency.Description
If
srcSubpassis equal todstSubpassthen theVkSubpassDependencydescribes 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 bysrcSubpassanddstSubpass.If
srcSubpassis equal toSUBPASS_EXTERNAL, the first synchronization scope includes commands that occur earlier in submission order than theCmdBeginRenderPassused to begin the render pass instance. Otherwise, the first set of commands includes all commands submitted as part of the subpass instance identified bysrcSubpassand any load, store or multisample resolve operations on attachments used insrcSubpass. In either case, the first synchronization scope is limited to operations on the pipeline stages determined by the source stage mask specified bysrcStageMask.If
dstSubpassis equal toSUBPASS_EXTERNAL, the second synchronization scope includes commands that occur later in submission order than theCmdEndRenderPassused to end the render pass instance. Otherwise, the second set of commands includes all commands submitted as part of the subpass instance identified bydstSubpassand any load, store or multisample resolve operations on attachments used indstSubpass. In either case, the second synchronization scope is limited to operations on the pipeline stages determined by the destination stage mask specified bydstStageMask.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 bysrcAccessMask.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 bydstAccessMask.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 matchingsrcAccessMaskanddstAccessMaskparameters) submitted as a part of aCmdPipelineBarrier(with matchingsrcStageMaskanddstStageMaskparameters). 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
VkImageMemoryBarrierdefined similarly to theVkMemoryBarrierabove, the queue family indices set toQUEUE_FAMILY_IGNORED, and layouts as follows:- The equivalent to
oldLayoutis the attachment’s layout according to the subpass description forsrcSubpass. - The equivalent to
newLayoutis the attachment’s layout according to the subpass description fordstSubpass.
Valid Usage
- If the geometry shaders feature is not enabled,
srcStageMaskmust not containPIPELINE_STAGE_GEOMETRY_SHADER_BIT - If the tessellation shaders feature is not enabled,
srcStageMaskmust not containPIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BITorPIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT - If the conditional rendering feature is not enabled,
srcStageMaskmust not containPIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT - If the fragment density map feature is not enabled,
srcStageMaskmust not containPIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT - If the transform feedback feature is not enabled,
srcStageMaskmust not containPIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT - If the mesh shaders feature is not enabled,
srcStageMaskmust not containPIPELINE_STAGE_MESH_SHADER_BIT_NV - If the task shaders feature is not enabled,
srcStageMaskmust not containPIPELINE_STAGE_TASK_SHADER_BIT_NV - If the shading rate image feature is not enabled,
srcStageMaskmust not containPIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV - If the
synchronization2feature is not enabled,srcStageMaskmust not be 0
- If the geometry shaders feature is not enabled,
dstStageMaskmust not containPIPELINE_STAGE_GEOMETRY_SHADER_BIT - If the tessellation shaders feature is not enabled,
dstStageMaskmust not containPIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BITorPIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT - If the conditional rendering feature is not enabled,
dstStageMaskmust not containPIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT - If the fragment density map feature is not enabled,
dstStageMaskmust not containPIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT - If the transform feedback feature is not enabled,
dstStageMaskmust not containPIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT - If the mesh shaders feature is not enabled,
dstStageMaskmust not containPIPELINE_STAGE_MESH_SHADER_BIT_NV - If the task shaders feature is not enabled,
dstStageMaskmust not containPIPELINE_STAGE_TASK_SHADER_BIT_NV - If the shading rate image feature is not enabled,
dstStageMaskmust not containPIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV - If the
synchronization2feature is not enabled,dstStageMaskmust not be 0 srcSubpassmust be less than or equal todstSubpass, unless one of them isSUBPASS_EXTERNAL, to avoid cyclic dependencies and ensure a valid execution ordersrcSubpassanddstSubpassmust not both be equal toSUBPASS_EXTERNAL- If
srcSubpassis equal todstSubpassand not all of the stages insrcStageMaskanddstStageMaskare framebuffer-space stages, the logically latest pipeline stage insrcStageMaskmust be logically earlier than or equal to the logically earliest pipeline stage indstStageMask - Any access flag included in
srcAccessMaskmust be supported by one of the pipeline stages insrcStageMask, as specified in the table of supported access types - Any access flag included in
dstAccessMaskmust be supported by one of the pipeline stages indstStageMask, as specified in the table of supported access types - If
srcSubpassequalsdstSubpass, andsrcStageMaskanddstStageMaskboth include a framebuffer-space stage, thendependencyFlagsmust includeDEPENDENCY_BY_REGION_BIT - If
dependencyFlagsincludesDEPENDENCY_VIEW_LOCAL_BIT,srcSubpassmust not be equal toSUBPASS_EXTERNAL - If
dependencyFlagsincludesDEPENDENCY_VIEW_LOCAL_BIT,dstSubpassmust not be equal toSUBPASS_EXTERNAL - If
srcSubpassequalsdstSubpassand that subpass has more than one bit set in the view mask, thendependencyFlagsmust includeDEPENDENCY_VIEW_LOCAL_BIT
Valid Usage (Implicit)
srcStageMaskmust be a valid combination ofVkPipelineStageFlagBitsvaluesdstStageMaskmust be a valid combination ofVkPipelineStageFlagBitsvaluessrcAccessMaskmust be a valid combination ofVkAccessFlagBitsvaluesdstAccessMaskmust be a valid combination ofVkAccessFlagBitsvaluesdependencyFlagsmust be a valid combination ofVkDependencyFlagBitsvalues
See Also
Layout
struct VkSubpassDependency { uint32_tsrcSubpass(); uint32_tdstSubpass(); VkPipelineStageFlagssrcStageMask(); VkPipelineStageFlagsdstStageMask(); VkAccessFlagssrcAccessMask(); VkAccessFlagsdstAccessMask(); VkDependencyFlagsdependencyFlags(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkSubpassDependency.BufferAn array ofVkSubpassDependencystructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDEPENDENCYFLAGS
DSTACCESSMASK
DSTSTAGEMASK
DSTSUBPASSThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSRCACCESSMASK
SRCSTAGEMASK
SRCSUBPASSThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkSubpassDependency(java.nio.ByteBuffer container)Creates aVkSubpassDependencyinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static VkSubpassDependencycalloc()Returns a newVkSubpassDependencyinstance allocated withmemCalloc.static VkSubpassDependency.Buffercalloc(int capacity)Returns a newVkSubpassDependency.Bufferinstance allocated withmemCalloc.static VkSubpassDependency.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSubpassDependency.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSubpassDependencycalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkSubpassDependencyinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSubpassDependencycallocStack()Deprecated.static VkSubpassDependency.BuffercallocStack(int capacity)Deprecated.static VkSubpassDependency.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkSubpassDependencycallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkSubpassDependencycreate()Returns a newVkSubpassDependencyinstance allocated withBufferUtils.static VkSubpassDependency.Buffercreate(int capacity)Returns a newVkSubpassDependency.Bufferinstance allocated withBufferUtils.static VkSubpassDependencycreate(long address)Returns a newVkSubpassDependencyinstance for the specified memory address.static VkSubpassDependency.Buffercreate(long address, int capacity)Create aVkSubpassDependency.Bufferinstance at the specified memory.static VkSubpassDependencycreateSafe(long address)static VkSubpassDependency.BuffercreateSafe(long address, int capacity)intdependencyFlags()a bitmask ofVkDependencyFlagBits.VkSubpassDependencydependencyFlags(int value)Sets the specified value to thedependencyFlags()field.intdstAccessMask()a bitmask ofVkAccessFlagBitsspecifying a destination access mask.VkSubpassDependencydstAccessMask(int value)Sets the specified value to thedstAccessMask()field.intdstStageMask()a bitmask ofVkPipelineStageFlagBitsspecifying the destination stage maskVkSubpassDependencydstStageMask(int value)Sets the specified value to thedstStageMask()field.intdstSubpass()the subpass index of the second subpass in the dependency, orSUBPASS_EXTERNAL.VkSubpassDependencydstSubpass(int value)Sets the specified value to thedstSubpass()field.static VkSubpassDependencymalloc()Returns a newVkSubpassDependencyinstance allocated withmemAlloc.static VkSubpassDependency.Buffermalloc(int capacity)Returns a newVkSubpassDependency.Bufferinstance allocated withmemAlloc.static VkSubpassDependency.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSubpassDependency.Bufferinstance allocated on the specifiedMemoryStack.static VkSubpassDependencymalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkSubpassDependencyinstance allocated on the specifiedMemoryStack.static VkSubpassDependencymallocStack()Deprecated.static VkSubpassDependency.BuffermallocStack(int capacity)Deprecated.static VkSubpassDependency.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkSubpassDependencymallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intndependencyFlags(long struct)Unsafe version ofdependencyFlags().static voidndependencyFlags(long struct, int value)Unsafe version ofdependencyFlags.static intndstAccessMask(long struct)Unsafe version ofdstAccessMask().static voidndstAccessMask(long struct, int value)Unsafe version ofdstAccessMask.static intndstStageMask(long struct)Unsafe version ofdstStageMask().static voidndstStageMask(long struct, int value)Unsafe version ofdstStageMask.static intndstSubpass(long struct)Unsafe version ofdstSubpass().static voidndstSubpass(long struct, int value)Unsafe version ofdstSubpass.static intnsrcAccessMask(long struct)Unsafe version ofsrcAccessMask().static voidnsrcAccessMask(long struct, int value)Unsafe version ofsrcAccessMask.static intnsrcStageMask(long struct)Unsafe version ofsrcStageMask().static voidnsrcStageMask(long struct, int value)Unsafe version ofsrcStageMask.static intnsrcSubpass(long struct)Unsafe version ofsrcSubpass().static voidnsrcSubpass(long struct, int value)Unsafe version ofsrcSubpass.VkSubpassDependencyset(int srcSubpass, int dstSubpass, int srcStageMask, int dstStageMask, int srcAccessMask, int dstAccessMask, int dependencyFlags)Initializes this struct with the specified values.VkSubpassDependencyset(VkSubpassDependency src)Copies the specified struct data to this struct.intsizeof()intsrcAccessMask()a bitmask ofVkAccessFlagBitsspecifying a source access mask.VkSubpassDependencysrcAccessMask(int value)Sets the specified value to thesrcAccessMask()field.intsrcStageMask()a bitmask ofVkPipelineStageFlagBitsspecifying the source stage mask.VkSubpassDependencysrcStageMask(int value)Sets the specified value to thesrcStageMask()field.intsrcSubpass()the subpass index of the first subpass in the dependency, orSUBPASS_EXTERNAL.VkSubpassDependencysrcSubpass(int value)Sets the specified value to thesrcSubpass()field.
-
-
-
Constructor Detail
-
VkSubpassDependency
public VkSubpassDependency(java.nio.ByteBuffer container)
Creates aVkSubpassDependencyinstance 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
srcSubpass
public int srcSubpass()
the subpass index of the first subpass in the dependency, orSUBPASS_EXTERNAL.
-
dstSubpass
public int dstSubpass()
the subpass index of the second subpass in the dependency, orSUBPASS_EXTERNAL.
-
srcStageMask
public int srcStageMask()
a bitmask ofVkPipelineStageFlagBitsspecifying the source stage mask.
-
dstStageMask
public int dstStageMask()
a bitmask ofVkPipelineStageFlagBitsspecifying the destination stage mask
-
srcAccessMask
public int srcAccessMask()
a bitmask ofVkAccessFlagBitsspecifying a source access mask.
-
dstAccessMask
public int dstAccessMask()
a bitmask ofVkAccessFlagBitsspecifying a destination access mask.
-
dependencyFlags
public int dependencyFlags()
a bitmask ofVkDependencyFlagBits.
-
srcSubpass
public VkSubpassDependency srcSubpass(int value)
Sets the specified value to thesrcSubpass()field.
-
dstSubpass
public VkSubpassDependency dstSubpass(int value)
Sets the specified value to thedstSubpass()field.
-
srcStageMask
public VkSubpassDependency srcStageMask(int value)
Sets the specified value to thesrcStageMask()field.
-
dstStageMask
public VkSubpassDependency dstStageMask(int value)
Sets the specified value to thedstStageMask()field.
-
srcAccessMask
public VkSubpassDependency srcAccessMask(int value)
Sets the specified value to thesrcAccessMask()field.
-
dstAccessMask
public VkSubpassDependency dstAccessMask(int value)
Sets the specified value to thedstAccessMask()field.
-
dependencyFlags
public VkSubpassDependency dependencyFlags(int value)
Sets the specified value to thedependencyFlags()field.
-
set
public VkSubpassDependency set(int srcSubpass, int dstSubpass, int srcStageMask, int dstStageMask, int srcAccessMask, int dstAccessMask, int dependencyFlags)
Initializes this struct with the specified values.
-
set
public VkSubpassDependency set(VkSubpassDependency src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkSubpassDependency malloc()
Returns a newVkSubpassDependencyinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkSubpassDependency calloc()
Returns a newVkSubpassDependencyinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkSubpassDependency create()
Returns a newVkSubpassDependencyinstance allocated withBufferUtils.
-
create
public static VkSubpassDependency create(long address)
Returns a newVkSubpassDependencyinstance for the specified memory address.
-
createSafe
@Nullable public static VkSubpassDependency createSafe(long address)
-
malloc
public static VkSubpassDependency.Buffer malloc(int capacity)
Returns a newVkSubpassDependency.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkSubpassDependency.Buffer calloc(int capacity)
Returns a newVkSubpassDependency.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkSubpassDependency.Buffer create(int capacity)
Returns a newVkSubpassDependency.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkSubpassDependency.Buffer create(long address, int capacity)
Create aVkSubpassDependency.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkSubpassDependency.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkSubpassDependency mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkSubpassDependency callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkSubpassDependency mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkSubpassDependency callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkSubpassDependency.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkSubpassDependency.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkSubpassDependency.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkSubpassDependency.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkSubpassDependency malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkSubpassDependencyinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkSubpassDependency calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkSubpassDependencyinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkSubpassDependency.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSubpassDependency.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkSubpassDependency.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSubpassDependency.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsrcSubpass
public static int nsrcSubpass(long struct)
Unsafe version ofsrcSubpass().
-
ndstSubpass
public static int ndstSubpass(long struct)
Unsafe version ofdstSubpass().
-
nsrcStageMask
public static int nsrcStageMask(long struct)
Unsafe version ofsrcStageMask().
-
ndstStageMask
public static int ndstStageMask(long struct)
Unsafe version ofdstStageMask().
-
nsrcAccessMask
public static int nsrcAccessMask(long struct)
Unsafe version ofsrcAccessMask().
-
ndstAccessMask
public static int ndstAccessMask(long struct)
Unsafe version ofdstAccessMask().
-
ndependencyFlags
public static int ndependencyFlags(long struct)
Unsafe version ofdependencyFlags().
-
nsrcSubpass
public static void nsrcSubpass(long struct, int value)Unsafe version ofsrcSubpass.
-
ndstSubpass
public static void ndstSubpass(long struct, int value)Unsafe version ofdstSubpass.
-
nsrcStageMask
public static void nsrcStageMask(long struct, int value)Unsafe version ofsrcStageMask.
-
ndstStageMask
public static void ndstStageMask(long struct, int value)Unsafe version ofdstStageMask.
-
nsrcAccessMask
public static void nsrcAccessMask(long struct, int value)Unsafe version ofsrcAccessMask.
-
ndstAccessMask
public static void ndstAccessMask(long struct, int value)Unsafe version ofdstAccessMask.
-
ndependencyFlags
public static void ndependencyFlags(long struct, int value)Unsafe version ofdependencyFlags.
-
-