Understanding physical and logical devices
Vulkan divides the representation of a device into two forms known as the logical and physical device:
Physical device: A physical device represents a single workforce that may comprise a single GPU along with other hardware parts that work together to help the system accomplish the submitted jobs. On a very simple system, a physical device can be considered to represent the physical GPU unit.
Logical device: A logical device represents the application view of the actual device.
Physical devices
OpenGL does not expose physical devices; it connects them behind the curtains. Vulkan, on the other hand, exposes the system real computing device or GPU to the application. It allows the application to enumerate the physical devices available on the system.
Note
In this section, we will add a new user-defined class called VulkanDevice
; this class is implemented in VulkanDevice.h/.cpp
. It is responsible for managing the physical (VkPhysicalDevice
) and logical...