<p>Looks like I just had a typo in my file.</p>
<p>The file had to be at <code>/my/project/dir/build/src</code> (i.e. the place I got from <code>std::filesystem::current_path()</code>) and the content now is</p>
<pre><code>khronos_validation.message_id_filter = &quot;UNASSIGNED-BestPractices-vkCreateInstance-specialuse-extension-debugging&quot;
</code></pre>
<p>(in my question it was <code>...validation_message...</code> instead of <code>...validation.message...</code>)</p>

CC BY-SA 4.0
2023-07-13T08:37:52.523Z
if it works now, please accept your answer so that this question is considered answered
Thomas
CC BY-SA 4.0
2023-07-13T08:57:27.347Z
Yeah, I have to wait 2 days to be able to do that. As soon as I can, I will.
Tare
CC BY-SA 4.0
2023-07-13T09:13:34.220Z
ahh okay, sorry =)
Thomas
CC BY-SA 4.0
2023-07-12T12:11:42.290Z
2023-07-12T12:11:42.290Z
Tare
<p>I have just activated the Vulkan <a href="https://vulkan.lunarg.com/doc/view/1.2.189.0/linux/best_practices.html" rel="nofollow noreferrer">Best Practices Validation</a> and due to that I get the following warning:</p>
<blockquote>
<p>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.</p>
</blockquote>
<p>Naturally, I don't need to see this in a debug build, so I'd like to filter this message out in debug builds. <a href="https://vulkan.lunarg.com/doc/view/1.2.189.0/windows/layer_configuration.html" rel="nofollow noreferrer">According to the docs</a> one can use the message id filter with the <code>vk_layer_settings.txt</code>:</p>
<blockquote>
<p>By default, the settings file must be named <code>vk_layer_settings.txt</code> and reside in the working directory of the targeted application.</p>
</blockquote>
<p>I have checked the current directory with <code>std::filesystem::current_path()</code> (pointing to <code>/my/project/dir/build/src/</code>) and put the layer settings file there, and I have also tried to put it next to the debug .exe file (at <code>/my/project/dir/build/src/Debug/MyProject.exe</code>).</p>
<p>The contents of my file are:</p>
<pre><code>khronos_validation-message_id_filter = &quot;UNASSIGNED-BestPractices-vkCreateInstance-specialuse-extension-debugging&quot;
</code></pre>
<p>I have tried to use the id instead of the message name:</p>
<pre><code>khronos_validation-message_id_filter = &quot;0x822806fa&quot;
</code></pre>
<p>Neither of the two has worked at either of the locations. How do I correctly use this filter then?</p>
<p>If this is in any way important, the project is build with CMake with the main file residing at <code>/my/project/dir/CMakeLists.txt</code> and the build done through</p>
<pre><code>cd /my/project/dir/build
cmake ..
</code></pre>
<p>And finally compiling the solution via Visual Studio 2022</p>

<vulkan>
How to set Vulkan Validation Layer filter via the vk_layer_settings.txt?
Tare
# How to set Vulkan Validation Layer filter via the vk_layer_settings.txt?

(Asked by: username_0 on 2023-07-12)

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

**Tags:** vulkan

---

## 1 answers

### Answer by username_0 on 2023-07-12. Score: 0 | Accepted answer

Looks like I just had a typo in my file.
The file had to be at /my/project/dir/build/src (i.e. the place I got from std::filesystem::current_path()) and the content now is
khronos_validation.message_id_filter = "UNASSIGNED-BestPractices-vkCreateInstance-specialuse-extension-debugging"

(in my question it was ...validation_message... instead of ...validation.message...)

> **Comments:**
> **username_1**: if it works now, please accept your answer so that this question is considered answered  
> **username_0**: Yeah, I have to wait 2 days to be able to do that. As soon as I can, I will.  
> **username_1**: ahh okay, sorry =)  

---

