Class VmaPoolCreateInfo

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VmaPoolCreateInfo>
org.lwjgl.util.vma.VmaPoolCreateInfo
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VmaPoolCreateInfo extends org.lwjgl.system.Struct<VmaPoolCreateInfo> implements org.lwjgl.system.NativeResource
Describes parameter of created VmaPool.

Layout


 struct VmaPoolCreateInfo {
     uint32_t memoryTypeIndex();
     VmaPoolCreateFlags flags();
     VkDeviceSize blockSize();
     size_t minBlockCount();
     size_t maxBlockCount();
     float priority();
     VkDeviceSize minAllocationAlignment();
     void * pMemoryAllocateNext();
 }
  • Field Details

    • SIZEOF

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

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

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

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

      public static final int BLOCKSIZE
      The struct member offsets.
    • MINBLOCKCOUNT

      public static final int MINBLOCKCOUNT
      The struct member offsets.
    • MAXBLOCKCOUNT

      public static final int MAXBLOCKCOUNT
      The struct member offsets.
    • PRIORITY

      public static final int PRIORITY
      The struct member offsets.
    • MINALLOCATIONALIGNMENT

      public static final int MINALLOCATIONALIGNMENT
      The struct member offsets.
    • PMEMORYALLOCATENEXT

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

    • VmaPoolCreateInfo

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

      public int memoryTypeIndex()
      Vulkan memory type index to allocate this pool from
    • flags

      public int flags()
    • blockSize

      public long blockSize()
      size of a single VkDeviceMemory block to be allocated as part of this pool, in bytes. Optional.

      Specify nonzero to set explicit, constant size of memory blocks used by this pool. Leave 0 to use default and let the library manage block sizes automatically. Sizes of particular blocks may vary. In this case, the pool will also support dedicated allocations.

    • minBlockCount

      public long minBlockCount()
      minimum number of blocks to be always allocated in this pool, even if they stay empty.

      Set to 0 to have no preallocated blocks and allow the pool be completely empty.

    • maxBlockCount

      public long maxBlockCount()
      maximum number of blocks that can be allocated in this pool. Optional.

      Set to 0 to use default, which is SIZE_MAX, which means no limit. Set to same value as VmaPoolCreateInfo::minBlockCount to have fixed amount of memory allocated throughout whole lifetime of this pool.

    • priority

      public float priority()
      A floating-point value between 0 and 1, indicating the priority of the allocations in this pool relative to other memory allocations.

      It is used only when ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT flag was used during creation of the VmaAllocator object. Otherwise, this variable is ignored.

    • minAllocationAlignment

      public long minAllocationAlignment()
      Additional minimum alignment to be used for all allocations created from this pool. Can be 0.

      Leave 0 (default) not to impose any additional alignment. If not 0, it must be a power of two. It can be useful in cases where alignment returned by Vulkan by functions like vkGetBufferMemoryRequirements is not enough, e.g. when doing interop with OpenGL.

    • pMemoryAllocateNext

      public long pMemoryAllocateNext()
      Additional pNext chain to be attached to VkMemoryAllocateInfo used for every allocation made by this pool. Optional.

      Optional, can be null. If not null, it must point to a pNext chain of structures that can be attached to VkMemoryAllocateInfo. It can be useful for special needs such as adding VkExportMemoryAllocateInfoKHR. Structures pointed by this member must remain alive and unchanged for the whole lifetime of the custom pool.

      Please note that some structures, e.g. VkMemoryPriorityAllocateInfoEXT, VkMemoryDedicatedAllocateInfoKHR, can be attached automatically by this library when using other, more convenient of its features.

    • memoryTypeIndex

      public VmaPoolCreateInfo memoryTypeIndex(int value)
      Sets the specified value to the memoryTypeIndex() field.
    • flags

      public VmaPoolCreateInfo flags(int value)
      Sets the specified value to the flags() field.
    • blockSize

      public VmaPoolCreateInfo blockSize(long value)
      Sets the specified value to the blockSize() field.
    • minBlockCount

      public VmaPoolCreateInfo minBlockCount(long value)
      Sets the specified value to the minBlockCount() field.
    • maxBlockCount

      public VmaPoolCreateInfo maxBlockCount(long value)
      Sets the specified value to the maxBlockCount() field.
    • priority

      public VmaPoolCreateInfo priority(float value)
      Sets the specified value to the priority() field.
    • minAllocationAlignment

      public VmaPoolCreateInfo minAllocationAlignment(long value)
      Sets the specified value to the minAllocationAlignment() field.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(long value)
      Sets the specified value to the pMemoryAllocateNext() field.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkDedicatedAllocationMemoryAllocateInfoNV value)
      Prepends the specified VkDedicatedAllocationMemoryAllocateInfoNV value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkExportMemoryAllocateInfo value)
      Prepends the specified VkExportMemoryAllocateInfo value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkExportMemoryAllocateInfoKHR value)
      Prepends the specified VkExportMemoryAllocateInfoKHR value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkExportMemoryAllocateInfoNV value)
      Prepends the specified VkExportMemoryAllocateInfoNV value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkExportMemoryWin32HandleInfoKHR value)
      Prepends the specified VkExportMemoryWin32HandleInfoKHR value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkExportMemoryWin32HandleInfoNV value)
      Prepends the specified VkExportMemoryWin32HandleInfoNV value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkExportMetalObjectCreateInfoEXT value)
      Prepends the specified VkExportMetalObjectCreateInfoEXT value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkImportAndroidHardwareBufferInfoANDROID value)
      Prepends the specified VkImportAndroidHardwareBufferInfoANDROID value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkImportMemoryFdInfoKHR value)
      Prepends the specified VkImportMemoryFdInfoKHR value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkImportMemoryHostPointerInfoEXT value)
      Prepends the specified VkImportMemoryHostPointerInfoEXT value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkImportMemoryWin32HandleInfoKHR value)
      Prepends the specified VkImportMemoryWin32HandleInfoKHR value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkImportMemoryWin32HandleInfoNV value)
      Prepends the specified VkImportMemoryWin32HandleInfoNV value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkImportMetalBufferInfoEXT value)
      Prepends the specified VkImportMetalBufferInfoEXT value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkMemoryAllocateFlagsInfo value)
      Prepends the specified VkMemoryAllocateFlagsInfo value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkMemoryAllocateFlagsInfoKHR value)
      Prepends the specified VkMemoryAllocateFlagsInfoKHR value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkMemoryDedicatedAllocateInfo value)
      Prepends the specified VkMemoryDedicatedAllocateInfo value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkMemoryDedicatedAllocateInfoKHR value)
      Prepends the specified VkMemoryDedicatedAllocateInfoKHR value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkMemoryOpaqueCaptureAddressAllocateInfo value)
      Prepends the specified VkMemoryOpaqueCaptureAddressAllocateInfo value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkMemoryOpaqueCaptureAddressAllocateInfoKHR value)
      Prepends the specified VkMemoryOpaqueCaptureAddressAllocateInfoKHR value to the pMemoryAllocateNext chain.
    • pMemoryAllocateNext

      public VmaPoolCreateInfo pMemoryAllocateNext(org.lwjgl.vulkan.VkMemoryPriorityAllocateInfoEXT value)
      Prepends the specified VkMemoryPriorityAllocateInfoEXT value to the pMemoryAllocateNext chain.
    • set

      public VmaPoolCreateInfo set(int memoryTypeIndex, int flags, long blockSize, long minBlockCount, long maxBlockCount, float priority, long minAllocationAlignment, long pMemoryAllocateNext)
      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 VmaPoolCreateInfo malloc()
      Returns a new VmaPoolCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static VmaPoolCreateInfo.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 VmaPoolCreateInfo.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 VmaPoolCreateInfo malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VmaPoolCreateInfo instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

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

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

      public static int nmemoryTypeIndex(long struct)
      Unsafe version of memoryTypeIndex().
    • nflags

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

      public static long nblockSize(long struct)
      Unsafe version of blockSize().
    • nminBlockCount

      public static long nminBlockCount(long struct)
      Unsafe version of minBlockCount().
    • nmaxBlockCount

      public static long nmaxBlockCount(long struct)
      Unsafe version of maxBlockCount().
    • npriority

      public static float npriority(long struct)
      Unsafe version of priority().
    • nminAllocationAlignment

      public static long nminAllocationAlignment(long struct)
      Unsafe version of minAllocationAlignment().
    • npMemoryAllocateNext

      public static long npMemoryAllocateNext(long struct)
      Unsafe version of pMemoryAllocateNext().
    • nmemoryTypeIndex

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

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

      public static void nblockSize(long struct, long value)
      Unsafe version of blockSize.
    • nminBlockCount

      public static void nminBlockCount(long struct, long value)
      Unsafe version of minBlockCount.
    • nmaxBlockCount

      public static void nmaxBlockCount(long struct, long value)
      Unsafe version of maxBlockCount.
    • npriority

      public static void npriority(long struct, float value)
      Unsafe version of priority.
    • nminAllocationAlignment

      public static void nminAllocationAlignment(long struct, long value)
      Unsafe version of minAllocationAlignment.
    • npMemoryAllocateNext

      public static void npMemoryAllocateNext(long struct, long value)
      Unsafe version of pMemoryAllocateNext.