Package icyllis.arc3d.vulkan
Class VulkanMemoryAllocator
java.lang.Object
icyllis.arc3d.vulkan.VulkanMemoryAllocator
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Force to use dedicated allocation.static final int
Used for memoryless attachments on TBDR GPU.static final int
Use persistent mapping.protected long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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)
-
Field Details
-
kDedicatedAllocation_AllocFlag
public static final int kDedicatedAllocation_AllocFlagForce to use dedicated allocation.- See Also:
-
kPersistentlyMapped_AllocFlag
public static final int kPersistentlyMapped_AllocFlagUse persistent mapping.- See Also:
-
kLazyAllocation_AllocFlag
public static final int kLazyAllocation_AllocFlagUsed 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 interfaceAutoCloseable
-
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
-