83ccee9b6969baa58d7fe9440c6c7326a2bcb13b
[demo] / src / vulkan / allocator.h
1 #ifndef ALLOCATOR_H_
2 #define ALLOCATOR_H_
3
4 #include <vulkan/vulkan.h>
5
6 struct DevMemBlock {
7         VkDeviceMemory dev_mem;
8         int offset;
9         int size;
10 };
11
12 bool vku_allocate(int size, DevMemBlock *block);
13 void vku_free(VkDeviceMemory gpu_memory);
14
15 bool vku_map_memory(VkDeviceMemory gpu_mem, int size, void *data);
16 void vku_unmap_memory(VkDeviceMemory gpu_mem);
17
18 #endif // ALLOCATOR_H_