[d3d11] Lock context before EmitCs for annotations

This commit is contained in:
Joshua Ashton 2021-12-17 17:48:51 +00:00 committed by Philip Rebohle
parent 3bfad1e70e
commit ecd7b67069
1 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,8 @@ namespace dxvk {
if (!m_container->IsAnnotationEnabled())
return -1;
D3D10DeviceLock lock = m_container->LockContext();
m_container->EmitCs([labelName = dxvk::str::fromws(Name)](DxvkContext *ctx) {
VkDebugUtilsLabelEXT label;
label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;
@ -57,6 +59,8 @@ namespace dxvk {
if (!m_container->IsAnnotationEnabled())
return -1;
D3D10DeviceLock lock = m_container->LockContext();
m_container->EmitCs([](DxvkContext *ctx) {
ctx->endDebugLabel();
});
@ -70,6 +74,8 @@ namespace dxvk {
if (!m_container->IsAnnotationEnabled())
return;
D3D10DeviceLock lock = m_container->LockContext();
m_container->EmitCs([labelName = dxvk::str::fromws(Name)](DxvkContext *ctx) {
VkDebugUtilsLabelEXT label;
label.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT;