Class VkMemoryBarrier

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkMemoryBarrier>
org.lwjgl.vulkan.VkMemoryBarrier
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VkMemoryBarrier extends org.lwjgl.system.Struct<VkMemoryBarrier> implements org.lwjgl.system.NativeResource
Structure specifying a global memory barrier.
Description

The first access scope is limited to access types in the source access mask specified by srcAccessMask.

The second access scope is limited to access types in the destination access mask specified by dstAccessMask.

Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_MEMORY_BARRIER
  • pNext must be NULL
  • srcAccessMask must be a valid combination of VkAccessFlagBits values
  • dstAccessMask must be a valid combination of VkAccessFlagBits values
See Also

CmdPipelineBarrier, CmdWaitEvents

Layout


 struct VkMemoryBarrier {
     VkStructureType sType();
     void const * pNext();
     VkAccessFlags srcAccessMask();
     VkAccessFlags dstAccessMask();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • STYPE

      public static final int STYPE
      The struct member offsets.
    • PNEXT

      public static final int PNEXT
      The struct member offsets.
    • SRCACCESSMASK

      public static final int SRCACCESSMASK
      The struct member offsets.
    • DSTACCESSMASK

      public static final int DSTACCESSMASK
      The struct member offsets.
  • Constructor Details

    • VkMemoryBarrier

      public VkMemoryBarrier(ByteBuffer container)
      Creates a VkMemoryBarrier 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.

  • Method Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkMemoryBarrier>
    • sType

      public int sType()
      a VkStructureType value identifying this structure.
    • pNext

      public long pNext()
      NULL or a pointer to a structure extending this structure.
    • srcAccessMask

      public int srcAccessMask()
      a bitmask of VkAccessFlagBits specifying a source access mask.
    • dstAccessMask

      public int dstAccessMask()
      a bitmask of VkAccessFlagBits specifying a destination access mask.
    • sType

      public VkMemoryBarrier sType(int value)
      Sets the specified value to the sType() field.
    • sType$Default

      public VkMemoryBarrier sType$Default()
      Sets the STRUCTURE_TYPE_MEMORY_BARRIER value to the sType() field.
    • pNext

      public VkMemoryBarrier pNext(long value)
      Sets the specified value to the pNext() field.
    • srcAccessMask

      public VkMemoryBarrier srcAccessMask(int value)
      Sets the specified value to the srcAccessMask() field.
    • dstAccessMask

      public VkMemoryBarrier dstAccessMask(int value)
      Sets the specified value to the dstAccessMask() field.
    • set

      public VkMemoryBarrier set(int sType, long pNext, int srcAccessMask, int dstAccessMask)
      Initializes this struct with the specified values.
    • set

      public VkMemoryBarrier set(VkMemoryBarrier src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static VkMemoryBarrier malloc()
      Returns a new VkMemoryBarrier instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static VkMemoryBarrier calloc()
      Returns a new VkMemoryBarrier instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static VkMemoryBarrier create()
      Returns a new VkMemoryBarrier instance allocated with BufferUtils.
    • create

      public static VkMemoryBarrier create(long address)
      Returns a new VkMemoryBarrier instance for the specified memory address.
    • createSafe

      public static @Nullable VkMemoryBarrier createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkMemoryBarrier.Buffer malloc(int capacity)
      Returns a new VkMemoryBarrier.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VkMemoryBarrier.Buffer calloc(int capacity)
      Returns a new VkMemoryBarrier.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkMemoryBarrier.Buffer create(int capacity)
      Returns a new VkMemoryBarrier.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkMemoryBarrier.Buffer create(long address, int capacity)
      Create a VkMemoryBarrier.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable VkMemoryBarrier.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static VkMemoryBarrier mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryBarrier callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkMemoryBarrier mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryBarrier callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkMemoryBarrier.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryBarrier.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkMemoryBarrier.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryBarrier.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static VkMemoryBarrier malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkMemoryBarrier instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VkMemoryBarrier calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkMemoryBarrier instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static VkMemoryBarrier.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkMemoryBarrier.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static VkMemoryBarrier.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkMemoryBarrier.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nsType

      public static int nsType(long struct)
      Unsafe version of sType().
    • npNext

      public static long npNext(long struct)
      Unsafe version of pNext().
    • nsrcAccessMask

      public static int nsrcAccessMask(long struct)
      Unsafe version of srcAccessMask().
    • ndstAccessMask

      public static int ndstAccessMask(long struct)
      Unsafe version of dstAccessMask().
    • nsType

      public static void nsType(long struct, int value)
      Unsafe version of sType.
    • npNext

      public static void npNext(long struct, long value)
      Unsafe version of pNext.
    • nsrcAccessMask

      public static void nsrcAccessMask(long struct, int value)
      Unsafe version of srcAccessMask.
    • ndstAccessMask

      public static void ndstAccessMask(long struct, int value)
      Unsafe version of dstAccessMask.