Implementing debugging in Vulkan

Since debugging is exposed by validation layers, most of the core implementation of the debugging will be done under the VulkanLayerAndExtension class (VulkanLED.h/.cpp). In this section, we will learn about the implementation that will help us enable the debugging process in Vulkan:

The Vulkan debug facility is not part of the default core functionalities. Therefore, in order to enable debugging and access the report callback feature, we need to add the necessary extensions and layers:

  • Extension: Add the VK_EXT_DEBUG_REPORT_EXTENSION_NAME extension to the instance level. This will help in exposing the Vulkan debug APIs to the application:
 vector<const char *> instanceExtensionNames = { . . . . // other extensios ...

Get Learning Vulkan now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.