diff --git a/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp index 4ee90cf7d..9a4edea8a 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp @@ -601,6 +601,10 @@ bool WrappedVulkan::Serialise_vkBeginCommandBuffer(Serialiser *localSerialiser, cmd = GetResourceManager()->GetLiveHandle(bakeId); } + // propagate any name there might be + if(m_CreationInfo.m_Names.find(cmdId) != m_CreationInfo.m_Names.end()) + m_CreationInfo.m_Names[GetResourceManager()->GetLiveID(bakeId)] = m_CreationInfo.m_Names[cmdId]; + { VulkanDrawcallTreeNode *draw = new VulkanDrawcallTreeNode; m_BakedCmdBufferInfo[cmdId].draw = draw; diff --git a/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp index e2fcd1693..95861e96b 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_misc_funcs.cpp @@ -1088,7 +1088,15 @@ bool WrappedVulkan::Serialise_vkDebugMarkerSetObjectNameEXT(Serialiser *localSer localSerialiser->Serialise("name", name); if(m_State == READING) - m_CreationInfo.m_Names[GetResourceManager()->GetLiveID(id)] = name; + { + // if we don't have a live resource, this is probably a command buffer being named on the + // virtual non-existant parent, not any of the baked IDs. Just save the name on the original ID + // and we'll propagate it in Serialise_vkBeginCommandBuffer + if(!GetResourceManager()->HasLiveResource(id)) + m_CreationInfo.m_Names[id] = name; + else + m_CreationInfo.m_Names[GetResourceManager()->GetLiveID(id)] = name; + } return true; }