Repository navigation
layersvt: Refactor DebugMarker to inherit from LayerBase - #32
Open
olehkuznetsov wants to merge 3 commits into
Open
olehkuznetsov wants to merge 3 commits into
olehkuznetsov wants to merge 3 commits into
Conversation
olehkuznetsov
force-pushed
the
pr-debugmarker
branch
from
September 2, 2026 19:52
fb5ec25 to
ad83236
Compare
olehkuznetsov
force-pushed
the
pr-debugmarker
branch
2 times, most recently
from
September 22, 2026 12:14
5e3b67c to
a4bda4c
Compare
olehkuznetsov
force-pushed
the
pr-debugmarker
branch
from
September 22, 2026 17:37
a4bda4c to
2a57150
Compare
olehkuznetsov
force-pushed
the
pr-debugmarker
branch
2 times, most recently
from
October 12, 2026 18:53
d162df9 to
f115e30
Compare
olehkuznetsov
requested review from
jimblacklercorp
and removed request for
emrekultursay
October 12, 2026 18:53
Refactor the DebugMarker layer to inherit from LayerBase, replacing handwritten Vulkan lifecycle boilerplate and dispatch bookkeeping with shared layersvt_common infrastructure: - Inherit DebugMarker from LayerBase and configure LayerManifest with VK_EXT_debug_marker and VK_EXT_debug_utils extensions. - Replace manual instance and device dispatch tables and physical device tracking with DispatchTableManager. - Remove handwritten vkCreateInstance, vkDestroyInstance, vkCreateDevice, vkDestroyDevice, and extension enumeration boilerplate from debug_marker_handwritten_dispatch.cpp. - Implement the GetLayerInstanceCommand and GetLayerDeviceCommand virtual hooks to intercept debug marker and debug utils commands. Since the layer implements both extensions itself, the hooks are returned unconditionally and forward downstream through DispatchDownstreamIfAvailable, DispatchDownstreamOrSuccess, or DispatchDownstreamOr, so they do not crash when the driver lacks the extensions. - Move the g_layer singleton into debug_marker_instance.cpp, which is compiled only into the layer module, so unit tests can manage the active instance via layer_test::ResetLayer. - Delete debug_marker_handwritten_functions.h header. - Add unit tests in test_debugmarker.cpp covering manifest queries, LayerBase lifecycle, dispatch fallback, and hooks with a downstream that lacks the extensions. Bug: Test: new tests - DebugMarkerTests Change-Id: I5ad00681e85f15d0779ad5dcea806b8e6a6a6964
Override PreDestroyDevice in DebugMarker to remove tracked object names associated with a destroyed VkDevice, preventing unbounded memory growth when devices are repeatedly created and destroyed. Add PreDestroyDeviceCleanupTest in test_debugmarker.cpp to verify that tracked objects for destroyed devices are cleaned up while preserving objects on remaining active devices. Bug: Test: new tests - DebugMarkerTests#PreDestroyDeviceCleanupTest Change-Id: I9a3624e7bf3fd05d6447adb46df887dd6a6a6964
olehkuznetsov
force-pushed
the
pr-debugmarker
branch
from
October 14, 2026 15:57
cd0b5ca to
b4ae542
Compare
DebugMarker advertises VK_EXT_debug_utils, so its messenger commands must work even when the downstream lacks the extension. Previously vkCreateDebugUtilsMessengerEXT returned VK_SUCCESS with a VK_NULL_HANDLE messenger, which violates the spec. When the instance's downstream exposes the messenger commands, they are still forwarded unchanged. Otherwise DebugMarker now emulates them: create stores the messenger parameters under a unique non-null handle, destroy removes them, and vkSubmitDebugUtilsMessageEXT invokes every callback whose severity and type masks match. Remaining emulated messengers are released in PreDestroyInstance. Bug: Test: new tests - DebugMarkerTests#EmulatedDebugUtilsMessengerTest, DebugMarkerTests#ForwardedDebugUtilsMessengerTest Change-Id: I3994aab14514096754541be3c718db8e6a6a6964
olehkuznetsov
force-pushed
the
pr-debugmarker
branch
from
October 14, 2026 17:53
b4ae542 to
ec10467
Compare
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.
Important
Dependent PR: This PR is stacked on top of #31 (
layersvt_commonfoundation). Please review and merge #31 first.The changes specific to this PR are in
layersvt/debug_marker/andlayersvt/test/test_debugmarker.cpp.Refactor the DebugMarker layer to inherit from
LayerBase, replacing handwritten Vulkan lifecycle boilerplate and dispatch bookkeeping with sharedlayersvt_commoninfrastructure:LayerBase: inheritDebugMarkerfromLayerBaseand configureLayerManifestwithVK_EXT_debug_markerandVK_EXT_debug_utilsextensions.DispatchTableManagerandDeviceInstanceTracker.vkCreateInstance,vkDestroyInstance,vkCreateDevice,vkDestroyDevice, and extension enumeration boilerplate fromdebug_marker_handwritten_dispatch.cpp.GetLayerSpecificInstanceFunctionandGetLayerSpecificDeviceFunctionvirtual hooks to dispatch debug marker and debug utils commands viaDispatchDownstream.PostDestroyDeviceto automatically clean up tracked debug objects associated with destroyed logical devices.debug_marker_handwritten_functions.hheader.test_debugmarker.cppcovering manifest queries,LayerBaselifecycle, object tracking cleanup, and dispatch fallback.Bug:
Test: new tests - DebugMarkerTests