Class VulkanMemoryAllocator

java.lang.Object
icyllis.arc3d.vulkan.VulkanMemoryAllocator
All Implemented Interfaces:
AutoCloseable

public class VulkanMemoryAllocator extends Object implements AutoCloseable
  • Field Details

    • kDedicatedAllocation_AllocFlag

      public static final int kDedicatedAllocation_AllocFlag
      Force to use dedicated allocation.
      See Also:
    • kPersistentlyMapped_AllocFlag

      public static final int kPersistentlyMapped_AllocFlag
      Use persistent mapping.
      See Also:
    • kLazyAllocation_AllocFlag

      public static final int kLazyAllocation_AllocFlag
      Used for memoryless attachments on TBDR GPU.
      See Also:
    • 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)