Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkImageMemoryBarrier

extends Struct<VkImageMemoryBarrier>
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 the parameters of an image memory barrier.
Description

The first access scope is limited to access to memory through the specified image subresource range, via access types in the source access mask specified by srcAccessMask. If srcAccessMask includes ACCESS_HOST_WRITE_BIT, memory writes performed by that access type are also made visible, as that access type is not performed through a resource.

The second access scope is limited to access to memory through the specified image subresource range, via access types in the destination access mask specified by dstAccessMask. If dstAccessMask includes ACCESS_HOST_WRITE_BIT or ACCESS_HOST_READ_BIT, available memory writes are also made visible to accesses of those types, as those access types are not performed through a resource.

If srcQueueFamilyIndex is not equal to dstQueueFamilyIndex, and srcQueueFamilyIndex is equal to the current queue family, then the memory barrier defines a queue family release operation for the specified image subresource range, and the second access scope includes no access, as if dstAccessMask was 0.

If dstQueueFamilyIndex is not equal to srcQueueFamilyIndex, and dstQueueFamilyIndex is equal to the current queue family, then the memory barrier defines a queue family acquire operation for the specified image subresource range, and the first access scope includes no access, as if srcAccessMask was 0.

If the synchronization2 feature is not enabled or oldLayout is not equal to newLayout, oldLayout and newLayout define an image layout transition for the specified image subresource range.

Note

If the synchronization2 feature is enabled, 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

VkImageSubresourceRange, CmdPipelineBarrier, CmdWaitEvents

Layout


struct VkImageMemoryBarrier {
    VkStructureType sType;
    void const * pNext;
    VkAccessFlags srcAccessMask;
    VkAccessFlags 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
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
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
VkImageMemoryBarrier(long address, ByteBuffer container)

public
VkImageMemoryBarrier(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public static VkImageMemoryBarrier
calloc()

Returns a new VkImageMemoryBarrier instance allocated with memCalloc.

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

Returns a new VkImageMemoryBarrier.Buffer instance allocated with memCalloc.

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

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

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

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

public static VkImageMemoryBarrier
callocStack()

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

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

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

Deprecated
Deprecated for removal in 3.4.0.
protected VkImageMemoryBarrier
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 VkImageMemoryBarrier
create()

Returns a new VkImageMemoryBarrier instance allocated with BufferUtils.

public static VkImageMemoryBarrier
create(long address)

Returns a new VkImageMemoryBarrier instance for the specified memory address.

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

Returns a new VkImageMemoryBarrier.Buffer instance allocated with BufferUtils.

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

Create a VkImageMemoryBarrier.Buffer instance at the specified memory.

public static VkImageMemoryBarrier
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public int
dstAccessMask()

a bitmask of VkAccessFlagBits specifying a destination access mask.

public VkImageMemoryBarrier
dstAccessMask(int value)

Sets the specified value to the dstAccessMask field.

public int
dstQueueFamilyIndex()

the destination queue family for a queue family ownership transfer.

public VkImageMemoryBarrier
dstQueueFamilyIndex(int value)

Sets the specified value to the dstQueueFamilyIndex field.

public long
image()

a handle to the image affected by this barrier.

public VkImageMemoryBarrier
image(long value)

Sets the specified value to the image field.

public static VkImageMemoryBarrier
malloc()

Returns a new VkImageMemoryBarrier instance allocated with memAlloc.

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

Returns a new VkImageMemoryBarrier.Buffer instance allocated with memAlloc.

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

Returns a new VkImageMemoryBarrier instance allocated on the specified MemoryStack.

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

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

public static VkImageMemoryBarrier
mallocStack()

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

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

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

Deprecated
Deprecated for removal in 3.4.0.
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
ndstQueueFamilyIndex(long struct)

Unsafe version of dstQueueFamilyIndex.

public static void
ndstQueueFamilyIndex(long struct, int value)

Unsafe version of dstQueueFamilyIndex.

public int
newLayout()

the new layout in an image layout transition.

public VkImageMemoryBarrier
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 int
nsrcAccessMask(long struct)

Unsafe version of srcAccessMask.

public static void
nsrcAccessMask(long struct, int 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 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 VkImageMemoryBarrier
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 VkImageMemoryBarrier
pNext(long value)

Sets the specified value to the pNext field.

public VkImageMemoryBarrier
pNext(VkExternalMemoryAcquireUnmodifiedEXT value)

Prepends the specified VkExternalMemoryAcquireUnmodifiedEXT value to the pNext chain.

public VkImageMemoryBarrier
pNext(VkSampleLocationsInfoEXT value)

Prepends the specified VkSampleLocationsInfoEXT value to the pNext chain.

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

Initializes this struct with the specified values.

public VkImageMemoryBarrier

Returns:

this struct
set
(VkImageMemoryBarrier
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 VkImageMemoryBarrier
srcAccessMask(int value)

Sets the specified value to the srcAccessMask field.

public int
srcQueueFamilyIndex()

the source queue family for a queue family ownership transfer.

public VkImageMemoryBarrier
srcQueueFamilyIndex(int value)

Sets the specified value to the srcQueueFamilyIndex field.

public int
sType()

a VkStructureType value identifying this structure.

public VkImageMemoryBarrier
sType(int value)

Sets the specified value to the sType field.

public VkImageMemoryBarrier
public VkImageSubresourceRange
subresourceRange()

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

public VkImageMemoryBarrier
public VkImageMemoryBarrier
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