8 VkDeviceMemory vk_allocate(int size)
10 VkDeviceMemory gpu_mem;
12 VkMemoryAllocateInfo gpu_alloc_inf;
13 memset(&gpu_alloc_inf, 0, sizeof gpu_alloc_inf);
14 gpu_alloc_inf.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
15 gpu_alloc_inf.allocationSize = size;
17 if(vkAllocateMemory(vk_device, &gpu_alloc_inf, 0, &gpu_mem) != VK_SUCCESS) {
18 fprintf(stderr, "Failed to allocate device memory, mem size: %d\n");