mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
[PR #2438] [MERGED] GPU/Vulkan: Add debug utility functions #1053
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?
📋 Pull Request Information
Original PR: https://github.com/stenzek/duckstation/pull/2438
Author: @Wunkolo
Created: 7/24/2021
Status: ✅ Merged
Merged: 8/7/2021
Merged by: @stenzek
Base:
master← Head:vk-debug📝 Commits (2)
494b6e0GPU/Vulkan: Add complete VK_EXT_debug_utils API entry points9808918GPU/Vulkan: Add debug utility functions📊 Changes
9 files changed (+599 additions, -44 deletions)
View changed files
📝
dep/vulkan-loader/include/vulkan_entry_points.h(+11 -0)📝
dep/vulkan-loader/include/vulkan_entry_points.inl(+9 -0)📝
src/common/vulkan/context.cpp(+26 -12)📝
src/common/vulkan/staging_texture.cpp(+10 -0)📝
src/common/vulkan/texture.cpp(+9 -1)📝
src/common/vulkan/util.cpp(+139 -0)📝
src/common/vulkan/util.h(+195 -1)📝
src/core/gpu_hw_vulkan.cpp(+147 -17)📝
src/frontend-common/vulkan_host_display.cpp(+53 -13)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.