Class VmaDefragmentationInfo

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

    public class VmaDefragmentationInfo
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Deprecated. Optional configuration parameters to be passed to function Defragment.

    This is a part of the old interface. It is recommended to use structure VmaDefragmentationInfo2 and function DefragmentationBegin instead.

    Member documentation

    • maxBytesToMove – maximum total numbers of bytes that can be copied while moving allocations to different places.

      Default is VK_WHOLE_SIZE, which means no limit.

    • maxAllocationsToMove – maximum number of allocations that can be moved to different place.

      Default is UINT32_MAX, which means no limit.

    Layout

    
     struct VmaDefragmentationInfo {
         VkDeviceSize maxBytesToMove;
         uint32_t maxAllocationsToMove;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MAXBYTESTOMOVE, MAXALLOCATIONSTOMOVE

        The struct member offsets.
    • Constructor Detail

      • VmaDefragmentationInfo

        public VmaDefragmentationInfo​(java.nio.ByteBuffer container)
        Creates a VmaDefragmentationInfo 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
      • maxBytesToMove

        public long maxBytesToMove()
        Returns the value of the maxBytesToMove field.
      • maxAllocationsToMove

        public int maxAllocationsToMove()
        Returns the value of the maxAllocationsToMove field.
      • maxBytesToMove

        public VmaDefragmentationInfo maxBytesToMove​(long value)
        Sets the specified value to the maxBytesToMove field.
      • maxAllocationsToMove

        public VmaDefragmentationInfo maxAllocationsToMove​(int value)
        Sets the specified value to the maxAllocationsToMove field.
      • set

        public VmaDefragmentationInfo set​(long maxBytesToMove,
                                          int maxAllocationsToMove)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

        public static VmaDefragmentationInfo mallocStack()
        Returns a new VmaDefragmentationInfo instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VmaDefragmentationInfo callocStack()
        Returns a new VmaDefragmentationInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static VmaDefragmentationInfo mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new VmaDefragmentationInfo instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

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

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

        public static VmaDefragmentationInfo.Buffer callocStack​(int capacity,
                                                                org.lwjgl.system.MemoryStack stack)
        Returns a new VmaDefragmentationInfo.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
      • nmaxBytesToMove

        public static long nmaxBytesToMove​(long struct)
        Unsafe version of maxBytesToMove().
      • nmaxAllocationsToMove

        public static int nmaxAllocationsToMove​(long struct)
        Unsafe version of maxAllocationsToMove().
      • nmaxBytesToMove

        public static void nmaxBytesToMove​(long struct,
                                           long value)
        Unsafe version of maxBytesToMove.
      • nmaxAllocationsToMove

        public static void nmaxAllocationsToMove​(long struct,
                                                 int value)
        Unsafe version of maxAllocationsToMove.