Reader small image

You're reading from  Learning Vulkan

Product typeBook
Published inDec 2016
Reading LevelBeginner
PublisherPackt
ISBN-139781786469809
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Parminder Singh
Parminder Singh
author image
Parminder Singh

Parminder Singh is a computation graphics engineer with Blackmagic Design, Singapore. He has been working and developing graphic applications in the fields of network simulations, geo-modeling, navigation, automotive, infotainment systems, image processing, and post-production for the past decade. His research interests include GPU programming for scalable graphics and compute applications, porting, and performance optimization techniques. He is a Vulkan, Metal and OpenGL ES trainer and has also authored OpenGL ES 3.0 Cookbook, Packt. His hobbies include traveling, light cooking, and spending quality time with his baby girl. Feel free to connect Parminder at https://www.linkedin.com/in/parmindersingh18 or you can reach him at http://openglescookbook.com.
Read more about Parminder Singh

Right arrow

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> gpuList; 
 
enumeratePhysicalDevices(gpuList); 
 
if (gpuList.size() > 0) { 
    appObj->handShakeWithDevice 
   (&gpuList[0], layerNames, deviceExtensionNames); 
} 
 
void VulkanApplication...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning Vulkan
Published in: Dec 2016Publisher: PacktISBN-13: 9781786469809

Author (1)

author image
Parminder Singh

Parminder Singh is a computation graphics engineer with Blackmagic Design, Singapore. He has been working and developing graphic applications in the fields of network simulations, geo-modeling, navigation, automotive, infotainment systems, image processing, and post-production for the past decade. His research interests include GPU programming for scalable graphics and compute applications, porting, and performance optimization techniques. He is a Vulkan, Metal and OpenGL ES trainer and has also authored OpenGL ES 3.0 Cookbook, Packt. His hobbies include traveling, light cooking, and spending quality time with his baby girl. Feel free to connect Parminder at https://www.linkedin.com/in/parmindersingh18&nbsp;or you can reach him at http://openglescookbook.com.
Read more about Parminder Singh