Fix EID counting when using D3D12 Command and Queue Annotations

This commit is contained in:
Jake Turner
2026-06-01 11:23:33 +01:00
parent ed795ee56f
commit 6c1f6e69be
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -4084,7 +4084,7 @@ RDResult WrappedVulkan::ContextReplayLog(CaptureState readType, uint32_t startEv
// boundaries, the event IDs would no longer match up).
if(m_LastCmdBufferID == ResourceId() || startEventID > 1)
{
if(chunktype != VulkanChunk::SetCommandAnnotation)
if(chunktype != VulkanChunk::SetQueueAnnotation)
m_RootEventID++;
if(startEventID > 1)
@@ -2814,17 +2814,17 @@ bool WrappedVulkan::Serialise_SetCommandAnnotation(SerialiserType &ser, VkComman
if(IsReplayingAndReading())
{
m_LastCmdBufferID = GetResID(cmd);
if(IsLoading(m_State))
{
if(!m_RootAnnotation)
m_RootAnnotation = new SDObject("Event Annotations"_lit, "Event Annotations"_lit);
ResourceId cmdId = GetResID(cmd);
PendingAnnotation annot = {m_BakedCmdBufferInfo[cmdId].curEventID, key, valueType,
PendingAnnotation annot = {m_BakedCmdBufferInfo[m_LastCmdBufferID].curEventID, key, valueType,
valueVectorWidth, value};
m_BakedCmdBufferInfo[cmdId].annotations.push_back(annot);
m_BakedCmdBufferInfo[m_LastCmdBufferID].annotations.push_back(annot);
m_Replay->WriteFrameRecord().frameInfo.containsAnnotations = true;
}