Fix usage of vkCreateDebugUtilsMessengerEXT/vk::Instance::createDebugUtilsMessengerEXT. - #1526
Open
asuessenbach wants to merge 3 commits into
Open
Fix usage of vkCreateDebugUtilsMessengerEXT/vk::Instance::createDebugUtilsMessengerEXT.#1526asuessenbach wants to merge 3 commits into
asuessenbach wants to merge 3 commits into
Conversation
asuessenbach
force-pushed
the
debug_callbacks
branch
from
May 4, 2026 09:58
6244d3b to
4b45ae1
Compare
asuessenbach
force-pushed
the
debug_callbacks
branch
from
July 7, 2026 12:05
4b45ae1 to
e4351ff
Compare
asuessenbach
force-pushed
the
debug_callbacks
branch
from
July 7, 2026 12:11
e4351ff to
4ca9095
Compare
…UtilsMessengerEXT.
asuessenbach
force-pushed
the
debug_callbacks
branch
from
July 7, 2026 12:30
4ca9095 to
0fcce1d
Compare
Contributor
Author
|
Note: I still had to manually undo some formatting so that the “clang-format” CI step could be completed successfully. |
SaschaWillems
approved these changes
Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Using
VkDebugUtilsMessengerCreateInfoEXTneeds special consideration, depending on where it is used.VkDebugUtilsMessengerCreateInfoEXTis specified to extendVkInstanceCreateInfo, and multiple instances of it in that extension chain are allowed. That is, with multipleVkDebugUtilsMessengerCreateInfoEXTs in that chain, multiple callbacks are created on instance creation, but just for a very short period of time.VkDebugUtilsMessengerCreateInfoEXTis not specified to extend itself! That is, with multiple instances of it in the pNext-chain for vkCreateDebugUtilsMessengerEXT, just the very firstVkDebugUtilsMessengerCreateInfoEXTin that chain is used to create a callback. Actually, I would have expected that the validation layers would fire a warning with such a usage.The sample
shader_debugprintfused an additionalVkDebugUtilsMessengerCreateInfoEXTfor both, Instance and DebugUtilsMessenger creation. Now, a separate local DebugUtilsMessenger is created to have both callbacks, the one from the sample and the one from the framework, alive.Build tested on Win11 with VS2022. Run tested on Win11 with NVidia GPU.
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: