Centralise resource naming with capture context to allow customisation

* We remove the now unneeded name fields in buffer/texture descriptions
  and some of the pipeline state structs.
* A single function will give the human-readable name for a resource id.
  This will look up a custom set of renames, on top of the names from
  the resource descriptions.
This commit is contained in:
baldurk
2017-11-17 16:30:53 +00:00
parent d009ed3b30
commit 7c8628b237
32 changed files with 342 additions and 860 deletions
+2 -2
View File
@@ -2600,7 +2600,7 @@ void BufferViewer::ViewBuffer(uint64_t byteOffset, uint64_t byteSize, ResourceId
BufferDescription *buf = m_Ctx.GetBuffer(id);
if(buf)
{
setWindowTitle(buf->name + lit(" - Contents"));
setWindowTitle(m_Ctx.GetResourceName(id) + lit(" - Contents"));
m_ObjectByteSize = buf->length;
}
@@ -2620,7 +2620,7 @@ void BufferViewer::ViewTexture(uint32_t arrayIdx, uint32_t mip, ResourceId id, c
TextureDescription *tex = m_Ctx.GetTexture(id);
if(tex)
{
setWindowTitle(tex->name + lit(" - Contents"));
setWindowTitle(m_Ctx.GetResourceName(id) + lit(" - Contents"));
m_ObjectByteSize = tex->byteSize;
}