I've followed this tutorial and when setting up validation layers the author says we have to setup debug callbacks so logs can be printed in stdout.
I didn't set them up and yet the application is printing various error messages in my terminal : Swapchain(ERROR): object 0x1cdd2d0 type: 1 location: 292 msgCode: 3: VkDestroyInstance() called before all of its associated VkSurfaceKHRs were destroyed for instance, when omitting the call to vkDestroySurfaceKHR.
I'm using VK_LAYER_LUNARG_standard_validation, and no particular extension (only VK_KHR_surface and VK_KHR_xcb_surface).
Is this expected behaviour?
The default logging behavior for the validation layers was changed back around June 1 because people wanted the messages to go to stdout without having to provide a callback or putting a vk_layer_settings.txt in the application's directory. The tutorial website might be out of date in this area.
If this is unwanted behavior, the easiest way to change it is to get a copy of vk_layer_settings.txt (shipped in SDK) and edit it to change the behavior to what you want, and then place it in what is the current directory when the application starts.
As an alternative, you can also code a debug callback.
For more info, please see the layer docs on the LunarXchange website.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With