Implementing devices and queues all together

In this section, we will revisit all of the knowledge we've gathered in this chapter so far and implement a program to create the device and queues from an application's view. Let's look at a step-by-step process that describes the flow of information.

First, enumerate the physical devices on the system using enumeratePhysicalDevices(); the retrieved physical device is stored in the gpuList vector. For the sake of simplicity, we are assuming the system has only one GPU (using the first element of gpuList). Next, we handshake with the device using the handShakeWithDevice() function:

/********** VulkanApplication.cpp **********/

// Get the list of physical devices on the system vector<VkPhysicalDevice> ...

Get Learning Vulkan now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.