Class VmaPoolCreateInfo

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MEMORYTYPEINDEX, FLAGS, BLOCKSIZE, MINBLOCKCOUNT, MAXBLOCKCOUNT, PRIORITY, MINALLOCATIONALIGNMENT, PMEMORYALLOCATENEXT

        The struct member offsets.
    • Constructor Detail

      • VmaPoolCreateInfo

        public VmaPoolCreateInfo​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • memoryTypeIndex

        public int memoryTypeIndex()
        Vulkan memory type index to allocate this pool from
      • 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.

      • 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.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.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.
      • 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

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

        @Nullable
        public static VmaPoolCreateInfo.Buffer createSafe​(long address,
                                                          int capacity)
        Like create, but returns null if address is NULL.
      • 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.
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.