[dxvk] Add command buffer parameter to debug label functions

This commit is contained in:
Philip Rebohle 2024-11-06 11:07:47 +01:00
parent 2230bd76a4
commit a8791fdd6a
2 changed files with 18 additions and 19 deletions

View file

@ -1048,25 +1048,28 @@ namespace dxvk {
void cmdBeginDebugUtilsLabel( void cmdBeginDebugUtilsLabel(
VkDebugUtilsLabelEXT* pLabelInfo) { DxvkCmdBuffer cmdBuffer,
const VkDebugUtilsLabelEXT& labelInfo) {
m_cmd.execCommands = true; m_cmd.execCommands = true;
m_vki->vkCmdBeginDebugUtilsLabelEXT(getCmdBuffer(), pLabelInfo); m_vki->vkCmdBeginDebugUtilsLabelEXT(getCmdBuffer(cmdBuffer), &labelInfo);
} }
void cmdEndDebugUtilsLabel() { void cmdEndDebugUtilsLabel(
DxvkCmdBuffer cmdBuffer) {
m_cmd.execCommands = true; m_cmd.execCommands = true;
m_vki->vkCmdEndDebugUtilsLabelEXT(getCmdBuffer()); m_vki->vkCmdEndDebugUtilsLabelEXT(getCmdBuffer(cmdBuffer));
} }
void cmdInsertDebugUtilsLabel( void cmdInsertDebugUtilsLabel(
VkDebugUtilsLabelEXT* pLabelInfo) { DxvkCmdBuffer cmdBuffer,
const VkDebugUtilsLabelEXT& labelInfo) {
m_cmd.execCommands = true; m_cmd.execCommands = true;
m_vki->vkCmdInsertDebugUtilsLabelEXT(getCmdBuffer(), pLabelInfo); m_vki->vkCmdInsertDebugUtilsLabelEXT(getCmdBuffer(cmdBuffer), &labelInfo);
} }

View file

@ -2477,25 +2477,21 @@ namespace dxvk {
} }
void DxvkContext::beginDebugLabel(VkDebugUtilsLabelEXT *label) { void DxvkContext::beginDebugLabel(VkDebugUtilsLabelEXT* label) {
if (!m_device->instance()->extensions().extDebugUtils) if (m_device->isDebugEnabled())
return; m_cmd->cmdBeginDebugUtilsLabel(DxvkCmdBuffer::ExecBuffer, *label);
m_cmd->cmdBeginDebugUtilsLabel(label);
} }
void DxvkContext::endDebugLabel() { void DxvkContext::endDebugLabel() {
if (!m_device->instance()->extensions().extDebugUtils) if (m_device->isDebugEnabled())
return; m_cmd->cmdEndDebugUtilsLabel(DxvkCmdBuffer::ExecBuffer);
m_cmd->cmdEndDebugUtilsLabel();
} }
void DxvkContext::insertDebugLabel(VkDebugUtilsLabelEXT *label) {
if (!m_device->instance()->extensions().extDebugUtils)
return;
m_cmd->cmdInsertDebugUtilsLabel(label); void DxvkContext::insertDebugLabel(VkDebugUtilsLabelEXT* label) {
if (m_device->isDebugEnabled())
m_cmd->cmdInsertDebugUtilsLabel(DxvkCmdBuffer::ExecBuffer, *label);
} }