mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
When setting command buffer names in vulkan, propagate to baked cmds
* We don't create any objects with the ID that the original name was applied to, we create a buffer for each baked version of that handle. * So on replay we need to apply the name down from the original object, and this also means temporarily storing the name in the original ID instead of as a live ID (since there is no live ID for the original command buffer object).
This commit is contained in:
@@ -601,6 +601,10 @@ bool WrappedVulkan::Serialise_vkBeginCommandBuffer(Serialiser *localSerialiser,
|
||||
cmd = GetResourceManager()->GetLiveHandle<VkCommandBuffer>(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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user