Class VmaPoolCreateInfo

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class VmaPoolCreateInfo
    extends Struct
    implements NativeResource

    Member documentation

    • memoryTypeIndex – Vulkan memory type index to allocate this pool from
    • flags – Use combination of VmaPoolCreateFlagBits. One or more of:
    • blockSize – size of a single VkDeviceMemory block to be allocated as part of this pool, in bytes.

      Optional. Leave 0 to use default.

    • 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 let the pool be completely empty.

    • maxBlockCount – maximum number of blocks that can be allocated in this pool.

      Optional. Set to 0 to use SIZE_MAX, which means no limit.

      Set to same value as minBlockCount to have fixed amount of memory allocated throuout whole lifetime of this pool.

    • frameInUseCount – maximum number of additional frames that are in use at the same time as current frame.

      This value is used only when you make allocations with ALLOCATION_CREATE_CAN_BECOME_LOST_BIT flag. Such allocation cannot become lost if allocation.lastUseFrameIndex >= allocator.currentFrameIndex - frameInUseCount.

      For example, if you double-buffer your command buffers, so resources used for rendering in previous frame may still be in use by the GPU at the moment you allocate resources needed for the current frame, set this value to 1.

      If you want to allow any allocations other than used in the current frame to become lost, set this value to 0.


     struct VmaPoolCreateInfo {
         uint32_t memoryTypeIndex;
         VmaPoolCreateFlags flags;
         VkDeviceSize blockSize;
         size_t minBlockCount;
         size_t maxBlockCount;
         uint32_t frameInUseCount;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • memoryTypeIndex

        public int memoryTypeIndex()
        Returns the value of the memoryTypeIndex field.
      • flags

        public int flags()
        Returns the value of the flags field.
      • blockSize

        public long blockSize()
        Returns the value of the blockSize field.
      • minBlockCount

        public long minBlockCount()
        Returns the value of the minBlockCount field.
      • maxBlockCount

        public long maxBlockCount()
        Returns the value of the maxBlockCount field.
      • frameInUseCount

        public int frameInUseCount()
        Returns the value of the frameInUseCount field.
      • 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.
      • frameInUseCount

        public VmaPoolCreateInfo frameInUseCount​(int value)
        Sets the specified value to the frameInUseCount field.
      • set

        public VmaPoolCreateInfo set​(int memoryTypeIndex,
                                     int flags,
                                     long blockSize,
                                     long minBlockCount,
                                     long maxBlockCount,
                                     int frameInUseCount)
        Initializes this struct with the specified values.
      • createSafe

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

        public static VmaPoolCreateInfo.Buffer createSafe​(long address,
                                                          int capacity)
        Like create, but returns null if address is NULL.
      • 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().
      • nframeInUseCount

        public static int nframeInUseCount​(long struct)
        Unsafe version of frameInUseCount().
      • 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.
      • nframeInUseCount

        public static void nframeInUseCount​(long struct,
                                            int value)
        Unsafe version of frameInUseCount.