Add a way to return basic information about all resources in a capture

* This provides a way to find the name of any resource besides 'special'
  resources like textures and buffers. In a follow-up commit, the names
  will be removed from their descriptors.
* It also allows us to list which chunks in the structured file were
  used to initialise the resource, giving the ability to look up and
  display the initialisation parameters.
* At the same time we also list the derived/parent resources to better
  allow the user to browse between related resources.
This commit is contained in:
baldurk committed 2017-11-17 16:30:49 +00:00
1 parent 8997cb9f07
commit 1c614029d8
24 files changed
+436 -66

No files matched your search

+26 -21
View File
@@ -293,33 +293,18 @@ CounterDescription ReplayController::DescribeCounter(GPUCounter counterID)
return m_pDevice->DescribeCounter(counterID);
}
rdcarray<BufferDescription> ReplayController::GetBuffers()
const rdcarray<ResourceDescription> &ReplayController::GetResources()
{
if(m_Buffers.empty())
{
vector<ResourceId> ids = m_pDevice->GetBuffers();
m_Buffers.resize(ids.size());
for(size_t i = 0; i < ids.size(); i++)
m_Buffers[i] = m_pDevice->GetBuffer(ids[i]);
}
return m_Resources;
}
const rdcarray<BufferDescription> &ReplayController::GetBuffers()
{
return m_Buffers;
}
rdcarray<TextureDescription> ReplayController::GetTextures()
const rdcarray<TextureDescription> &ReplayController::GetTextures()
{
if(m_Textures.empty())
{
vector<ResourceId> ids = m_pDevice->GetTextures();
m_Textures.resize(ids.size());
for(size_t i = 0; i < ids.size(); i++)
m_Textures[i] = m_pDevice->GetTexture(ids[i]);
}
return m_Textures;
}
@@ -1564,6 +1549,26 @@ ReplayStatus ReplayController::PostCreateInit(IReplayDriver *device, RDCFile *rd
FetchPipelineState();
{
std::vector<ResourceId> ids = m_pDevice->GetBuffers();
m_Buffers.resize(ids.size());
for(size_t i = 0; i < ids.size(); i++)
m_Buffers[i] = m_pDevice->GetBuffer(ids[i]);
}
{
std::vector<ResourceId> ids = m_pDevice->GetTextures();
m_Textures.resize(ids.size());
for(size_t i = 0; i < ids.size(); i++)
m_Textures[i] = m_pDevice->GetTexture(ids[i]);
}
m_Resources = m_pDevice->GetResources();
m_FrameRecord = m_pDevice->GetFrameRecord();
DrawcallDescription *previous = NULL;