Class VkMemoryMapInfo

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

public class VkMemoryMapInfo extends org.lwjgl.system.Struct<VkMemoryMapInfo> implements org.lwjgl.system.NativeResource
Structure containing parameters of a memory map operation.
Valid Usage
Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_MEMORY_MAP_INFO
  • pNext must be NULL or a pointer to a valid instance of VkMemoryMapPlacedInfoEXT
  • The sType value of each struct in the pNext chain must be unique
  • flags must be a valid combination of VkMemoryMapFlagBits values
  • memory must be a valid VkDeviceMemory handle
Host Synchronization
  • Host access to memory must be externally synchronized
See Also

MapMemory2, MapMemory2KHR

Layout


 struct VkMemoryMapInfo {
     VkStructureType sType();
     void const * pNext();
     VkMemoryMapFlags flags();
     VkDeviceMemory memory();
     VkDeviceSize offset();
     VkDeviceSize size();
 }
  • 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.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • MEMORY

      public static final int MEMORY
      The struct member offsets.
    • OFFSET

      public static final int OFFSET
      The struct member offsets.
    • SIZE

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

    • VkMemoryMapInfo

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

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

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

      public int flags()
      a bitmask of VkMemoryMapFlagBits specifying additional parameters of the memory map operation.
    • memory

      public long memory()
      the VkDeviceMemory object to be mapped.
    • offset

      public long offset()
      a zero-based byte offset from the beginning of the memory object.
    • size

      public long size()
      the size of the memory range to map, or WHOLE_SIZE to map from offset to the end of the allocation.
    • sType

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

      public VkMemoryMapInfo sType$Default()
      Sets the STRUCTURE_TYPE_MEMORY_MAP_INFO value to the sType() field.
    • pNext

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

      Prepends the specified VkMemoryMapPlacedInfoEXT value to the pNext chain.
    • flags

      public VkMemoryMapInfo flags(int value)
      Sets the specified value to the flags() field.
    • memory

      public VkMemoryMapInfo memory(long value)
      Sets the specified value to the memory() field.
    • offset

      public VkMemoryMapInfo offset(long value)
      Sets the specified value to the offset() field.
    • size

      public VkMemoryMapInfo size(long value)
      Sets the specified value to the size() field.
    • set

      public VkMemoryMapInfo set(int sType, long pNext, int flags, long memory, long offset, long size)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nflags(long struct)
      Unsafe version of flags().
    • nmemory

      public static long nmemory(long struct)
      Unsafe version of memory().
    • noffset

      public static long noffset(long struct)
      Unsafe version of offset().
    • nsize

      public static long nsize(long struct)
      Unsafe version of size().
    • 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.
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nmemory

      public static void nmemory(long struct, long value)
      Unsafe version of memory.
    • noffset

      public static void noffset(long struct, long value)
      Unsafe version of offset.
    • nsize

      public static void nsize(long struct, long value)
      Unsafe version of size.