Skip to content

Commit

Permalink
[hud] Add debug label for HUD rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
doitsujin committed Jan 8, 2025
1 parent 70f3e03 commit 74307e8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dxvk/hud/dxvk_hud_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ namespace dxvk::hud {
uint32_t dataPoint,
HudPos minPos,
HudPos maxPos) {
if (unlikely(m_device->isDebugEnabled())) {
ctx.cmd->cmdBeginDebugUtilsLabel(DxvkCmdBuffer::InitBuffer,
vk::makeLabel(0xf0c0dc, "HUD frame time processing"));
}

// Write current time stamp to the buffer
DxvkBufferSliceHandle sliceHandle = m_gpuBuffer->getSliceHandle();
std::pair<VkQueryPool, uint32_t> query = m_query->getQuery();
Expand Down Expand Up @@ -372,6 +377,9 @@ namespace dxvk::hud {
renderer.drawTextIndirect(ctx, key, drawParamBuffer,
drawInfoBuffer, textBufferView, 2u);

if (unlikely(m_device->isDebugEnabled()))
ctx.cmd->cmdEndDebugUtilsLabel(DxvkCmdBuffer::InitBuffer);

// Make sure GPU resources are being kept alive as necessary
ctx.cmd->track(m_gpuBuffer, DxvkAccess::Write);
ctx.cmd->track(m_query);
Expand Down
5 changes: 5 additions & 0 deletions src/dxvk/hud/dxvk_hud_renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ namespace dxvk::hud {
const Rc<DxvkImageView>& dstView,
VkColorSpaceKHR dstColorSpace,
const HudOptions& options) {
if (unlikely(m_device->isDebugEnabled())) {
ctx.cmd->cmdInsertDebugUtilsLabel(DxvkCmdBuffer::ExecBuffer,
vk::makeLabel(0xf0c0dc, "HUD"));
}

if (!m_fontTextureView) {
createFontResources();
uploadFontResources(ctx);
Expand Down

0 comments on commit 74307e8

Please sign in to comment.