mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 06:05:45 +00:00
Make sure all resource states have at least one subresource state
* Even if it's invalid, this removes the need to check whether the data for a given id is empty or not.
This commit is contained in:
@@ -1443,6 +1443,9 @@ void D3D12Replay::SavePipelineState()
|
||||
for(size_t l = 0; l < it->second.size(); l++)
|
||||
res.states[l].name = ToStr(it->second[l]);
|
||||
|
||||
if(res.states.empty())
|
||||
res.states.push_back({"Unknown"});
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1452,6 +1452,12 @@ void VulkanReplay::SavePipelineState()
|
||||
img.layouts[l].numMip = it->second.subresourceStates[l].subresourceRange.levelCount;
|
||||
}
|
||||
|
||||
if(img.layouts.empty())
|
||||
{
|
||||
img.layouts.push_back(VKPipe::ImageLayout());
|
||||
img.layouts[0].name = "Unknown";
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user