From 6ad5ee34e31551bf44a38ddf49bbb4a8a4d85918 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 14 Feb 2025 23:36:38 +0100 Subject: [PATCH] [dxvk] Change debug color for pipelines with side effects --- src/dxvk/dxvk_context.cpp | 15 ++++++++++++++- src/dxvk/dxvk_context.h | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 2d1ac6c54..ae353c996 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -5769,8 +5769,10 @@ namespace dxvk { } if (unlikely(m_features.test(DxvkContextFeature::DebugUtils))) { + uint32_t color = getGraphicsPipelineDebugColor(); + m_cmd->cmdInsertDebugUtilsLabel(DxvkCmdBuffer::ExecBuffer, - vk::makeLabel(0xa2dcf0, m_state.gp.pipeline->debugName())); + vk::makeLabel(color, m_state.gp.pipeline->debugName())); } m_flags.clr(DxvkContextFlag::GpDirtyPipelineState); @@ -5778,6 +5780,17 @@ namespace dxvk { } + uint32_t DxvkContext::getGraphicsPipelineDebugColor() const { + if (m_state.gp.flags.test(DxvkGraphicsPipelineFlag::HasStorageDescriptors)) + return 0xf0a2dc; + + if (m_state.gp.flags.test(DxvkGraphicsPipelineFlag::HasTransformFeedback)) + return 0xa2f0dc; + + return 0xa2dcf0; + } + + template void DxvkContext::resetSpecConstants( uint32_t newMask) { diff --git a/src/dxvk/dxvk_context.h b/src/dxvk/dxvk_context.h index d0b72f0f6..57d2fd45a 100644 --- a/src/dxvk/dxvk_context.h +++ b/src/dxvk/dxvk_context.h @@ -1693,6 +1693,8 @@ namespace dxvk { bool updateGraphicsPipeline(); bool updateGraphicsPipelineState(DxvkGlobalPipelineBarrier srcBarrier); + uint32_t getGraphicsPipelineDebugColor() const; + template void resetSpecConstants( uint32_t newMask);