mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-01 04:10:58 +00:00
Do not read baked command list info with ResourceId()
Avoid creating a default entry in the map
This commit is contained in:
@@ -2440,10 +2440,11 @@ void D3D12CommandData::AddAction(const ActionDescription &a)
|
||||
{
|
||||
D3D12ActionTreeNode node(action);
|
||||
|
||||
node.resourceUsage.swap(m_BakedCmdListInfo[m_LastCmdListID].resourceUsage);
|
||||
|
||||
if(m_LastCmdListID != ResourceId())
|
||||
{
|
||||
node.resourceUsage.swap(m_BakedCmdListInfo[m_LastCmdListID].resourceUsage);
|
||||
AddUsage(m_BakedCmdListInfo[m_LastCmdListID].state, node);
|
||||
}
|
||||
|
||||
for(const ActionDescription &child : action.children)
|
||||
node.children.push_back(D3D12ActionTreeNode(child));
|
||||
|
||||
@@ -5825,8 +5825,9 @@ void WrappedID3D12Device::ReplayLog(uint32_t startEventID, uint32_t endEventID,
|
||||
else
|
||||
{
|
||||
// Copy the state in case m_RenderState was modified externally for the partial replay.
|
||||
cmd.m_BakedCmdListInfo[cmd.m_Partial[D3D12CommandData::Primary].partialParent].state =
|
||||
cmd.m_RenderState;
|
||||
ResourceId cmdList = cmd.m_Partial[D3D12CommandData::Primary].partialParent;
|
||||
if(cmdList != ResourceId())
|
||||
cmd.m_BakedCmdListInfo[cmdList].state = cmd.m_RenderState;
|
||||
}
|
||||
|
||||
// we'll need our own command list if we're replaying just a subsection
|
||||
@@ -5875,8 +5876,11 @@ void WrappedID3D12Device::ReplayLog(uint32_t startEventID, uint32_t endEventID,
|
||||
if(HasFatalError())
|
||||
return;
|
||||
|
||||
cmd.m_RenderState =
|
||||
cmd.m_BakedCmdListInfo[cmd.m_Partial[D3D12CommandData::Primary].partialParent].state;
|
||||
ResourceId cmdList = cmd.m_Partial[D3D12CommandData::Primary].partialParent;
|
||||
if(cmdList != ResourceId())
|
||||
cmd.m_RenderState = cmd.m_BakedCmdListInfo[cmdList].state;
|
||||
else
|
||||
cmd.m_RenderState = D3D12RenderState();
|
||||
cmd.m_RenderState.ResolvePendingIndirectState(this);
|
||||
|
||||
if(D3D12_Debug_SingleSubmitFlushing())
|
||||
|
||||
Reference in New Issue
Block a user