1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 23:52:20 +01:00

[hud] Add debug label for HUD rendering

This commit is contained in:
Philip Rebohle 2025-01-08 16:25:50 +01:00 committed by Philip Rebohle
parent 279c6f150a
commit 071dec7148
2 changed files with 13 additions and 0 deletions

View File

@ -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();
@ -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);

View File

@ -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);