Creating a Vulkan logical device
A Vulkan device is a logical representation of a physical GPU. It’s an object that is associated with a selected physical device (an existing GPU in the system) and is used to perform all graphics and compute operations. The device also provides access to physical GPU capabilities through queues. Queues are used to submit commands to the GPU, such as draw calls or memory transfers. The device also provides access to other Vulkan objects, such as pipelines, buffers, and images.
In this recipe, you will learn how to create a Vulkan logical device.
Getting ready
The code in this recipe is available as part of the VulkanCore::Context
class in the repository. The Context
class represents a Vulkan logical device.
How to do it…
To create a Vulkan device, we need to provide a physical device and the indices of the queue families we want to use. Using this information, we can create a vector of VkDeviceQueueCreateInfo
structures...