Package icyllis.arc3d.vulkan

# Class VulkanMemoryAllocator

java.lang.Object
icyllis.arc3d.vulkan.VulkanMemoryAllocator

All Implemented Interfaces:
  `AutoCloseable`

public class VulkanMemoryAllocator extends Object implements AutoCloseable
AMD Vulkan Memory Allocator

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `kDedicatedAllocation_AllocFlag`
  Force to use dedicated allocation.
  `static final int`
  `kLazyAllocation_AllocFlag`
  Used for memoryless attachments on TBDR GPU.
  `static final int`
  `kPersistentlyMapped_AllocFlag`
  Use persistent mapping.
  `protected long`
  `mAllocator`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VulkanMemoryAllocator(long allocator)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `allocateBufferMemory(VulkanDevice device, long buffer, int usageFlags, int allocFlags, VulkanAllocation outAllocInfo)`
  `boolean`
  `allocateImageMemory(VulkanDevice device, long image, int allocFlags, VulkanAllocation outAllocInfo)`
  `void`
  `close()`
  `void`
  `freeMemory(VulkanAllocation allocInfo)`
  `static VulkanMemoryAllocator`
  `make(org.lwjgl.vulkan.VkInstance instance, org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, org.lwjgl.vulkan.VkDevice device, int physicalDeviceVersion, long largeHeapBlockSize)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### kDedicatedAllocation_AllocFlag

    public static final int kDedicatedAllocation_AllocFlag
    Force to use dedicated allocation.
    See Also:
      - Constant Field Values

  - ### kPersistentlyMapped_AllocFlag

    public static final int kPersistentlyMapped_AllocFlag
    Use persistent mapping.
    See Also:
      - Constant Field Values

  - ### kLazyAllocation_AllocFlag

    public static final int kLazyAllocation_AllocFlag
    Used for memoryless attachments on TBDR GPU.
    See Also:
      - Constant Field Values

  - ### mAllocator

    protected long mAllocator

- ## Constructor Details

  - ### VulkanMemoryAllocator

    public VulkanMemoryAllocator(long allocator)

- ## Method Details

  - ### make

    @Nullable public static VulkanMemoryAllocator make(org.lwjgl.vulkan.VkInstance instance, org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, org.lwjgl.vulkan.VkDevice device, int physicalDeviceVersion, long largeHeapBlockSize)

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`

  - ### allocateBufferMemory

    public boolean allocateBufferMemory(VulkanDevice device, long buffer, int usageFlags, int allocFlags, VulkanAllocation outAllocInfo)

  - ### allocateImageMemory

    public boolean allocateImageMemory(VulkanDevice device, long image, int allocFlags, VulkanAllocation outAllocInfo)

  - ### freeMemory

    public void freeMemory(VulkanAllocation allocInfo)