mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
[PR #2438] GPU/Vulkan: Add debug utility functions #1057
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/stenzek/duckstation/pull/2438
State: closed
Merged: Yes
Adds a way to set the name of vulkan objects, and automatically determining
their
VkObjectTypeenum value at compile-time. As well as a utility-objectfor creating debug-scopes for
VkQueueandVkCommandBufferobjects.DebugScopeobjects will automatically emitBeginandEndcommandswithin the ctor and dtor and allow for C++ scopes to name and color
sections of a vulkan command. These DebugScopes are also able
to be nested within each other and will automatically pick a color
depending on the current recursive depth.
These functions are all null-stubbed in non-debug compilations.
before:


This is how a captured command buffer would look like in renderdoc and nsight
after:


Now we have the exact C++-side scope of the function emitting the particular commands for each particular queue being submitted to, as well as profiling data for each scope