I have just activated the Vulkan Best Practices Validation and due to that I get the following warning:
Validation Layer(WARNING): Validation Warning: [ UNASSIGNED-BestPractices-vkCreateInstance-specialuse-extension-debugging ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x822806fa | CreateInstance(): Attempting to enable extension VK_EXT_debug_utils, but this extension is intended to support use by applications when debugging and it is strongly recommended that it be otherwise avoided.
Naturally, I don't need to see this in a debug build, so I'd like to filter this message out in debug builds. According to the docs one can use the message id filter with the vk_layer_settings.txt
:
By default, the settings file must be named
vk_layer_settings.txt
and reside in the working directory of the targeted application.
I have checked the current directory with std::filesystem::current_path()
(pointing to /my/project/dir/build/src/
) and put the layer settings file there, and I have also tried to put it next to the debug .exe file (at /my/project/dir/build/src/Debug/MyProject.exe
).
The contents of my file are:
khronos_validation-message_id_filter = "UNASSIGNED-BestPractices-vkCreateInstance-specialuse-extension-debugging"
I have tried to use the id instead of the message name:
khronos_validation-message_id_filter = "0x822806fa"
Neither of the two has worked at either of the locations. How do I correctly use this filter then?
If this is in any way important, the project is build with CMake with the main file residing at /my/project/dir/CMakeLists.txt
and the build done through
cd /my/project/dir/build
cmake ..
And finally compiling the solution via Visual Studio 2022