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 VK_EXT_DEBUG_REPORT_EXTENSION_NAME, };
Layer: Define the following layers at the instance level to allow debugging at these layers:
vector<const char *> layerNames = { ...