Class VkDependencyInfo

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkDependencyInfo>
org.lwjgl.vulkan.VkDependencyInfo
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
Direct Known Subclasses:
VkDependencyInfoKHR

public class VkDependencyInfo extends org.lwjgl.system.Struct<VkDependencyInfo> implements org.lwjgl.system.NativeResource
Structure specifying dependency information for a synchronization command.
Description

This structure defines a set of memory dependencies, as well as queue family ownership transfer operations and image layout transitions.

Each member of pMemoryBarriers, pBufferMemoryBarriers, and pImageMemoryBarriers defines a separate memory dependency.

Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_DEPENDENCY_INFO
  • pNext must be NULL
  • dependencyFlags must be a valid combination of VkDependencyFlagBits values
  • If memoryBarrierCount is not 0, pMemoryBarriers must be a valid pointer to an array of memoryBarrierCount valid VkMemoryBarrier2 structures
  • If bufferMemoryBarrierCount is not 0, pBufferMemoryBarriers must be a valid pointer to an array of bufferMemoryBarrierCount valid VkBufferMemoryBarrier2 structures
  • If imageMemoryBarrierCount is not 0, pImageMemoryBarriers must be a valid pointer to an array of imageMemoryBarrierCount valid VkImageMemoryBarrier2 structures
See Also

VkBufferMemoryBarrier2, VkImageMemoryBarrier2, VkMemoryBarrier2, CmdPipelineBarrier2, CmdPipelineBarrier2KHR, CmdSetEvent2, CmdSetEvent2KHR, CmdWaitEvents2, CmdWaitEvents2KHR

Layout


 struct VkDependencyInfo {
     VkStructureType sType();
     void const * pNext();
     VkDependencyFlags dependencyFlags();
     uint32_t memoryBarrierCount();
     VkMemoryBarrier2 const * pMemoryBarriers();
     uint32_t bufferMemoryBarrierCount();
     VkBufferMemoryBarrier2 const * pBufferMemoryBarriers();
     uint32_t imageMemoryBarrierCount();
     VkImageMemoryBarrier2 const * pImageMemoryBarriers();
 }
  • 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.
    • DEPENDENCYFLAGS

      public static final int DEPENDENCYFLAGS
      The struct member offsets.
    • MEMORYBARRIERCOUNT

      public static final int MEMORYBARRIERCOUNT
      The struct member offsets.
    • PMEMORYBARRIERS

      public static final int PMEMORYBARRIERS
      The struct member offsets.
    • BUFFERMEMORYBARRIERCOUNT

      public static final int BUFFERMEMORYBARRIERCOUNT
      The struct member offsets.
    • PBUFFERMEMORYBARRIERS

      public static final int PBUFFERMEMORYBARRIERS
      The struct member offsets.
    • IMAGEMEMORYBARRIERCOUNT

      public static final int IMAGEMEMORYBARRIERCOUNT
      The struct member offsets.
    • PIMAGEMEMORYBARRIERS

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

    • VkDependencyInfo

      public VkDependencyInfo(ByteBuffer container)
      Creates a VkDependencyInfo 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<VkDependencyInfo>
    • sType

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

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

      public int dependencyFlags()
      a bitmask of VkDependencyFlagBits specifying how execution and memory dependencies are formed.
    • memoryBarrierCount

      public int memoryBarrierCount()
      the length of the pMemoryBarriers array.
    • pMemoryBarriers

      public @Nullable VkMemoryBarrier2.Buffer pMemoryBarriers()
      a pointer to an array of VkMemoryBarrier2 structures defining memory dependencies between any memory accesses.
    • bufferMemoryBarrierCount

      public int bufferMemoryBarrierCount()
      the length of the pBufferMemoryBarriers array.
    • pBufferMemoryBarriers

      public @Nullable VkBufferMemoryBarrier2.Buffer pBufferMemoryBarriers()
      a pointer to an array of VkBufferMemoryBarrier2 structures defining memory dependencies between buffer ranges.
    • imageMemoryBarrierCount

      public int imageMemoryBarrierCount()
      the length of the pImageMemoryBarriers array.
    • pImageMemoryBarriers

      public @Nullable VkImageMemoryBarrier2.Buffer pImageMemoryBarriers()
      a pointer to an array of VkImageMemoryBarrier2 structures defining memory dependencies between image subresources.
    • sType

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

      public VkDependencyInfo sType$Default()
      Sets the STRUCTURE_TYPE_DEPENDENCY_INFO value to the sType() field.
    • pNext

      public VkDependencyInfo pNext(long value)
      Sets the specified value to the pNext() field.
    • dependencyFlags

      public VkDependencyInfo dependencyFlags(int value)
      Sets the specified value to the dependencyFlags() field.
    • pMemoryBarriers

      public VkDependencyInfo pMemoryBarriers(@Nullable VkMemoryBarrier2.Buffer value)
      Sets the address of the specified VkMemoryBarrier2.Buffer to the pMemoryBarriers() field.
    • pBufferMemoryBarriers

      public VkDependencyInfo pBufferMemoryBarriers(@Nullable VkBufferMemoryBarrier2.Buffer value)
      Sets the address of the specified VkBufferMemoryBarrier2.Buffer to the pBufferMemoryBarriers() field.
    • pImageMemoryBarriers

      public VkDependencyInfo pImageMemoryBarriers(@Nullable VkImageMemoryBarrier2.Buffer value)
      Sets the address of the specified VkImageMemoryBarrier2.Buffer to the pImageMemoryBarriers() field.
    • set

      public VkDependencyInfo set(int sType, long pNext, int dependencyFlags, @Nullable VkMemoryBarrier2.Buffer pMemoryBarriers, @Nullable VkBufferMemoryBarrier2.Buffer pBufferMemoryBarriers, @Nullable VkImageMemoryBarrier2.Buffer pImageMemoryBarriers)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static VkDependencyInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkDependencyInfo.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().
    • ndependencyFlags

      public static int ndependencyFlags(long struct)
      Unsafe version of dependencyFlags().
    • nmemoryBarrierCount

      public static int nmemoryBarrierCount(long struct)
      Unsafe version of memoryBarrierCount().
    • npMemoryBarriers

      public static @Nullable VkMemoryBarrier2.Buffer npMemoryBarriers(long struct)
      Unsafe version of pMemoryBarriers().
    • nbufferMemoryBarrierCount

      public static int nbufferMemoryBarrierCount(long struct)
      Unsafe version of bufferMemoryBarrierCount().
    • npBufferMemoryBarriers

      public static @Nullable VkBufferMemoryBarrier2.Buffer npBufferMemoryBarriers(long struct)
      Unsafe version of pBufferMemoryBarriers().
    • nimageMemoryBarrierCount

      public static int nimageMemoryBarrierCount(long struct)
      Unsafe version of imageMemoryBarrierCount().
    • npImageMemoryBarriers

      public static @Nullable VkImageMemoryBarrier2.Buffer npImageMemoryBarriers(long struct)
      Unsafe version of pImageMemoryBarriers().
    • 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.
    • ndependencyFlags

      public static void ndependencyFlags(long struct, int value)
      Unsafe version of dependencyFlags.
    • nmemoryBarrierCount

      public static void nmemoryBarrierCount(long struct, int value)
      Sets the specified value to the memoryBarrierCount field of the specified struct.
    • npMemoryBarriers

      public static void npMemoryBarriers(long struct, @Nullable VkMemoryBarrier2.Buffer value)
      Unsafe version of pMemoryBarriers.
    • nbufferMemoryBarrierCount

      public static void nbufferMemoryBarrierCount(long struct, int value)
      Sets the specified value to the bufferMemoryBarrierCount field of the specified struct.
    • npBufferMemoryBarriers

      public static void npBufferMemoryBarriers(long struct, @Nullable VkBufferMemoryBarrier2.Buffer value)
      Unsafe version of pBufferMemoryBarriers.
    • nimageMemoryBarrierCount

      public static void nimageMemoryBarrierCount(long struct, int value)
      Sets the specified value to the imageMemoryBarrierCount field of the specified struct.
    • npImageMemoryBarriers

      public static void npImageMemoryBarriers(long struct, @Nullable VkImageMemoryBarrier2.Buffer value)
      Unsafe version of pImageMemoryBarriers.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate