mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Fix calculation of resource use EIDs on D3D12
This commit is contained in:
@@ -594,16 +594,16 @@ bool WrappedID3D12CommandQueue::Serialise_ExecuteCommandLists(SerialiserType &se
|
||||
m_Cmd.m_Events[apievent.eventId] = apievent;
|
||||
}
|
||||
|
||||
m_Cmd.m_RootEventID += cmdListInfo.eventCount;
|
||||
m_Cmd.m_RootActionID += cmdListInfo.actionCount;
|
||||
|
||||
for(auto it = cmdListInfo.resourceUsage.begin(); it != cmdListInfo.resourceUsage.end(); ++it)
|
||||
{
|
||||
EventUsage u = it->second;
|
||||
u.eventId += m_Cmd.m_RootEventID - cmdListInfo.curEvents.count();
|
||||
u.eventId += m_Cmd.m_RootEventID;
|
||||
m_Cmd.m_ResourceUses[it->first].push_back(u);
|
||||
}
|
||||
|
||||
m_Cmd.m_RootEventID += cmdListInfo.eventCount;
|
||||
m_Cmd.m_RootActionID += cmdListInfo.actionCount;
|
||||
|
||||
{
|
||||
action.customName =
|
||||
StringFormat::Fmt("=> %s[%u]: Close(%s)", basename.c_str(), c, ToStr(cmd).c_str());
|
||||
|
||||
@@ -1618,16 +1618,14 @@ void BakedCmdListInfo::ShiftForRemoved(uint32_t shiftActionID, uint32_t shiftEID
|
||||
|
||||
for(APIEvent &ev : actions[i].action.events)
|
||||
ev.eventId -= shiftEID;
|
||||
|
||||
for(size_t u = 0; u < actions[i].resourceUsage.size(); u++)
|
||||
actions[i].resourceUsage[u].second.eventId -= shiftEID;
|
||||
}
|
||||
|
||||
uint32_t lastEID = actions[idx].action.eventId;
|
||||
|
||||
// shift any resource usage for actions after the removed section
|
||||
for(size_t i = 0; i < action->resourceUsage.size(); i++)
|
||||
{
|
||||
if(action->resourceUsage[i].second.eventId >= lastEID)
|
||||
action->resourceUsage[i].second.eventId -= shiftEID;
|
||||
}
|
||||
|
||||
// patch any subsequent executes
|
||||
for(size_t i = 0; i < executeEvents.size(); i++)
|
||||
|
||||
Reference in New Issue
Block a user