Package icyllis.arc3d.vulkan
Class VulkanMemoryAllocator
java.lang.Object
icyllis.arc3d.vulkan.VulkanMemoryAllocator
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intForce to use dedicated allocation.static final intUsed for memoryless attachments on TBDR GPU.static final intUse persistent mapping.protected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallocateBufferMemory(VulkanDevice device, long buffer, int usageFlags, int allocFlags, VulkanAllocation outAllocInfo) booleanallocateImageMemory(VulkanDevice device, long image, int allocFlags, VulkanAllocation outAllocInfo) voidclose()voidfreeMemory(VulkanAllocation allocInfo) static @Nullable VulkanMemoryAllocatormake(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
public static @Nullable 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:
closein 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
-