buffer allocation
[demo] / src / vulkan / allocator.h
index dd730e3..ad4c87f 100644 (file)
@@ -3,7 +3,13 @@
 
 #include <vulkan/vulkan.h>
 
-VkDeviceMemory vk_allocate(int size);
-void vk_free(VkDeviceMemory gpu_memory);
+struct DevMemBlock {
+       VkDeviceMemory dev_mem;
+       int offset;
+       int size;
+};
+
+bool vku_allocate(int size, DevMemBlock *block);
+void vku_free(VkDeviceMemory gpu_memory);
 
 #endif // ALLOCATOR_H_