Images, similarly to buffers, are not created with a bound memory storage. We need to implicitly create a memory object and bind it to the image. We can also use an existing memory object for this purpose.
Allocating and binding a memory object to an image
How to do it...
- Take the handle of a physical device from which a logical device was created. Store it in a variable of type VkPhysicalDevice named physical_device.
- Create a variable of type VkPhysicalDeviceMemoryProperties named physical_device_memory_properties.
- Call vkGetPhysicalDeviceMemoryProperties( physical_device, &physical_device_memory_properties ), for which provide the handle of the physical device and a pointer to the physical_device_memory_properties variable. This call will store memory parameters...