1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-13 19:29:14 +01:00

[dxvk] Add debug label for render target clears

This commit is contained in:
Philip Rebohle 2025-01-08 14:50:13 +01:00 committed by Philip Rebohle
parent 1b9ea8c6e3
commit ca2afb0b8b

View File

@ -1798,6 +1798,12 @@ namespace dxvk {
flushPendingAccesses(*imageView, DxvkAccess::Write);
if (unlikely(m_features.test(DxvkContextFeature::DebugUtils))) {
const char* imageName = imageView->image()->info().debugName;
m_cmd->cmdBeginDebugUtilsLabel(DxvkCmdBuffer::ExecBuffer,
vk::makeLabel(0xe6f0dc, str::format("Clear render target (", imageName ? imageName : "unknown", ")").c_str()));
}
// Set up a temporary render pass to execute the clear
VkImageLayout imageLayout = ((clearAspects | discardAspects) & VK_IMAGE_ASPECT_COLOR_BIT)
? imageView->pickLayout(VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL)
@ -1883,6 +1889,9 @@ namespace dxvk {
imageView->image()->info().stages,
imageView->image()->info().access);
if (unlikely(m_features.test(DxvkContextFeature::DebugUtils)))
m_cmd->cmdEndDebugUtilsLabel(DxvkCmdBuffer::ExecBuffer);
m_cmd->track(imageView->image(), DxvkAccess::Write);
} else {
// Perform the operation when starting the next render pass