Images are continuous array of bytes stored in 1D, 2D, or 3D form. Unlike the buffer resource, an image is a formatted piece of information stored in the memory.
The image resource in Vulkan is represented by the VkImage
object and created using the vkCreateImage
API. The creation of this object does not back with the actual image contents, yet. This has to be done separately, where device memory is allocated and the image contents are stored into it. This memory is then bound to the created object.
In order to utilize the created images' objects at the shader stage, they must be converted into the image view—VkImageView
. Before you convert an image into an image view, it has to be made compatible with the underlying implementation using image layouts.
The image is converted into the implementation-dependent layouts using VkImageLayout
. For a given image resource, multiple image layouts can be created and used across. Different layouts might expose different performance...