Refactor rdcstr with small-string and literal-string optimisations

* rdcstr no longer inherits from rdcarray, it implements all functionality
  itself.
* There are now three representations:
  - Heap-allocated, same as how rdcarray behaves.
  - Local-allocated, for small strings we store them in a union array.
  - Compile-time literal, only created from user-defined literals.
* The main observation is that a lot of RenderDoc's strings are compile-time
  literals either from struct names, member names, or stringified enum values.
  Storing these directly and allowing them to be moved and copied quickly saves
  on allocations and time. When the string is modified, it's copied to one of the other formats.
This commit is contained in:
baldurk
2019-05-08 14:03:04 +01:00
parent fb333ebc9b
commit c8a518f05c
7 changed files with 1275 additions and 124 deletions
+1 -1
View File
@@ -2805,7 +2805,7 @@ void TextureViewer::OnEventChanged(uint32_t eventId)
QString bindName = (copy || clear) ? tr("Destination") : QString();
QString slotName = (copy || clear)
? tr("DST")
: (m_Ctx.CurPipelineState().OutputAbbrev() + QString::number(rt));
: QString(m_Ctx.CurPipelineState().OutputAbbrev() + QString::number(rt));
InitResourcePreview(prev, RTs[rt].resourceId, RTs[rt].typeHint, false, follow, bindName,
slotName);