Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkImageMemoryBarrier2

extends Struct<VkImageMemoryBarrier2>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Known Direct Subclasses
org.lwjgl.vulkan.VkImageMemoryBarrier2KHR
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure specifying an image memory barrier.
Description

This structure defines a memory dependency limited to an image subresource range, and can define a queue family transfer operation and image layout transition for that subresource range.

The first synchronization scope and access scope described by this structure include only operations and memory accesses specified by srcStageMask and srcAccessMask.

The second synchronization scope and access scope described by this structure include only operations and memory accesses specified by dstStageMask and dstAccessMask.

Both access scopes are limited to only memory accesses to image in the subresource range defined by subresourceRange.

If image was created with SHARING_MODE_EXCLUSIVE, and srcQueueFamilyIndex is not equal to dstQueueFamilyIndex, this memory barrier defines a queue family transfer operation. When executed on a queue in the family identified by srcQueueFamilyIndex, this barrier defines a queue family release operation for the specified image subresource range, and the second synchronization and access scopes do not synchronize operations on that queue. When executed on a queue in the family identified by dstQueueFamilyIndex, this barrier defines a queue family acquire operation for the specified image subresource range, and the first synchronization and access scopes do not synchronize operations on that queue.

A queue family transfer operation is also defined if the values are not equal, and either is one of the special queue family values reserved for external memory ownership transfers, as described in Queue Family Ownership Transfer. A queue family release operation is defined when dstQueueFamilyIndex is one of those values, and a queue family acquire operation is defined when srcQueueFamilyIndex is one of those values.

If oldLayout is not equal to newLayout, then the memory barrier defines an image layout transition for the specified image subresource range. If this memory barrier defines a queue family transfer operation, the layout transition is only executed once between the queues.

Note

When the old and new layout are equal, the layout values are ignored - data is preserved no matter what values are specified, or what layout the image is currently in.

If image has a multi-planar format and the image is disjoint, then including IMAGE_ASPECT_COLOR_BIT in the aspectMask member of subresourceRange is equivalent to including IMAGE_ASPECT_PLANE_0_BIT, IMAGE_ASPECT_PLANE_1_BIT, and (for three-plane formats only) IMAGE_ASPECT_PLANE_2_BIT.

Valid Usage
Valid Usage (Implicit)
See Also

VkDependencyInfo, VkImageSubresourceRange

Layout


struct VkImageMemoryBarrier2 {
    VkStructureType sType;
    void const * pNext;
    VkPipelineStageFlags2 srcStageMask;
    VkAccessFlags2 srcAccessMask;
    VkPipelineStageFlags2 dstStageMask;
    VkAccessFlags2 dstAccessMask;
    VkImageLayout oldLayout;
    VkImageLayout newLayout;
    uint32_t srcQueueFamilyIndex;
    uint32_t dstQueueFamilyIndex;
    VkImage image;
    VkImageSubresourceRange subresourceRange;
}

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
DSTACCESSMASK

The struct member offsets.

public static final int
DSTQUEUEFAMILYINDEX

The struct member offsets.

public static final int
DSTSTAGEMASK

The struct member offsets.

public static final int
IMAGE

The struct member offsets.

public static final int
NEWLAYOUT

The struct member offsets.

public static final int
OLDLAYOUT

The struct member offsets.

public static final int
PNEXT

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
SRCQUEUEFAMILYINDEX

The struct member offsets.

public static final int
SRCSTAGEMASK

The struct member offsets.

public static final int
STYPE

The struct member offsets.

public static final int
SUBRESOURCERANGE

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
VkImageMemoryBarrier2(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public static VkImageMemoryBarrier2
calloc()

Returns a new VkImageMemoryBarrier2 instance allocated with memCalloc.

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

Returns a new VkImageMemoryBarrier2.Buffer instance allocated with memCalloc.

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

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

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

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

protected VkImageMemoryBarrier2
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 VkImageMemoryBarrier2
create()

Returns a new VkImageMemoryBarrier2 instance allocated with BufferUtils.

public static VkImageMemoryBarrier2
create(long address)

Returns a new VkImageMemoryBarrier2 instance for the specified memory address.

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

Returns a new VkImageMemoryBarrier2.Buffer instance allocated with BufferUtils.

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

Create a VkImageMemoryBarrier2.Buffer instance at the specified memory.

public static VkImageMemoryBarrier2
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public long
dstAccessMask()

a VkAccessFlags2 mask of access flags to be included in the second access scope.

public VkImageMemoryBarrier2
dstAccessMask(long value)

Sets the specified value to the dstAccessMask field.

public int
dstQueueFamilyIndex()

the destination queue family for a queue family ownership transfer.

public VkImageMemoryBarrier2
dstQueueFamilyIndex(int value)

Sets the specified value to the dstQueueFamilyIndex field.

public long
dstStageMask()

a VkPipelineStageFlags2 mask of pipeline stages to be included in the second synchronization scope.

public VkImageMemoryBarrier2
dstStageMask(long value)

Sets the specified value to the dstStageMask field.

public long
image()

a handle to the image affected by this barrier.

public VkImageMemoryBarrier2
image(long value)

Sets the specified value to the image field.

public static VkImageMemoryBarrier2
malloc()

Returns a new VkImageMemoryBarrier2 instance allocated with memAlloc.

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

Returns a new VkImageMemoryBarrier2.Buffer instance allocated with memAlloc.

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

Returns a new VkImageMemoryBarrier2 instance allocated on the specified MemoryStack.

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

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

public static long
ndstAccessMask(long struct)

Unsafe version of dstAccessMask.

public static void
ndstAccessMask(long struct, long value)

Unsafe version of dstAccessMask.

public static int
ndstQueueFamilyIndex(long struct)

Unsafe version of dstQueueFamilyIndex.

public static void
ndstQueueFamilyIndex(long struct, int value)

Unsafe version of dstQueueFamilyIndex.

public static long
ndstStageMask(long struct)

Unsafe version of dstStageMask.

public static void
ndstStageMask(long struct, long value)

Unsafe version of dstStageMask.

public int
newLayout()

the new layout in an image layout transition.

public VkImageMemoryBarrier2
newLayout(int value)

Sets the specified value to the newLayout field.

public static long
nimage(long struct)

Unsafe version of image.

public static void
nimage(long struct, long value)

Unsafe version of image.

public static int
nnewLayout(long struct)

Unsafe version of newLayout.

public static void
nnewLayout(long struct, int value)

Unsafe version of newLayout.

public static int
noldLayout(long struct)

Unsafe version of oldLayout.

public static void
noldLayout(long struct, int value)

Unsafe version of oldLayout.

public static long
npNext(long struct)

Unsafe version of pNext.

public static void
npNext(long struct, long value)

Unsafe version of pNext.

public static long
nsrcAccessMask(long struct)

Unsafe version of srcAccessMask.

public static void
nsrcAccessMask(long struct, long value)

Unsafe version of srcAccessMask.

public static int
nsrcQueueFamilyIndex(long struct)

Unsafe version of srcQueueFamilyIndex.

public static void
nsrcQueueFamilyIndex(long struct, int value)

Unsafe version of srcQueueFamilyIndex.

public static long
nsrcStageMask(long struct)

Unsafe version of srcStageMask.

public static void
nsrcStageMask(long struct, long value)

Unsafe version of srcStageMask.

public static int
nsType(long struct)

Unsafe version of sType.

public static void
nsType(long struct, int value)

Unsafe version of sType.

public static VkImageSubresourceRange
nsubresourceRange(long struct)

Unsafe version of subresourceRange.

public static void
nsubresourceRange(long struct, VkImageSubresourceRange value)

Unsafe version of subresourceRange.

public int
oldLayout()

the old layout in an image layout transition.

public VkImageMemoryBarrier2
oldLayout(int value)

Sets the specified value to the oldLayout field.

public long
pNext()

NULL or a pointer to a structure extending this structure.

public VkImageMemoryBarrier2
pNext(long value)

Sets the specified value to the pNext field.

public VkImageMemoryBarrier2
pNext(VkExternalMemoryAcquireUnmodifiedEXT value)

Prepends the specified VkExternalMemoryAcquireUnmodifiedEXT value to the pNext chain.

public VkImageMemoryBarrier2
pNext(VkSampleLocationsInfoEXT value)

Prepends the specified VkSampleLocationsInfoEXT value to the pNext chain.

public VkImageMemoryBarrier2
set(int sType, long pNext, long srcStageMask, long srcAccessMask, long dstStageMask, long dstAccessMask, int oldLayout, int newLayout, int srcQueueFamilyIndex, int dstQueueFamilyIndex, long image, VkImageSubresourceRange subresourceRange)

Initializes this struct with the specified values.

public VkImageMemoryBarrier2

Returns:

this struct
set
(VkImageMemoryBarrier2
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 long
srcAccessMask()

a VkAccessFlags2 mask of access flags to be included in the first access scope.

public VkImageMemoryBarrier2
srcAccessMask(long value)

Sets the specified value to the srcAccessMask field.

public int
srcQueueFamilyIndex()

the source queue family for a queue family ownership transfer.

public VkImageMemoryBarrier2
srcQueueFamilyIndex(int value)

Sets the specified value to the srcQueueFamilyIndex field.

public long
srcStageMask()

a VkPipelineStageFlags2 mask of pipeline stages to be included in the first synchronization scope.

public VkImageMemoryBarrier2
srcStageMask(long value)

Sets the specified value to the srcStageMask field.

public int
sType()

a VkStructureType value identifying this structure.

public VkImageMemoryBarrier2
sType(int value)

Sets the specified value to the sType field.

public VkImageMemoryBarrier2
public VkImageSubresourceRange
subresourceRange()

describes the image subresource range within image that is affected by this barrier.

public VkImageMemoryBarrier2
public VkImageMemoryBarrier2
subresourceRange(Consumer<VkImageSubresourceRange> consumer)

Passes the subresourceRange field to the specified Consumer.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate