* On GL addressing modes are called wrap modes, and the wrap value is then known
as repeat. If we don't 'localise' this then it can be confusing to show that
it is "Wrap".
* XGetGeometry will only work on X IDs so we had a wrap/unwrap pass for
GLXWindows, but that fails for pbuffers and there's no need when
glXQueryDrawable can query sizes just as well.
* 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.
* Now that the dirty list is only read once at the start of the frame we can
mark resources dirty mid-frame freely and don't have to defer that. The
internal resource manager locking prevents us from adding to the list while it
is being modified.
* This is primarily around initial states - either a resource which is from a
previous frame and maybe wasn't dirtied and needs initial states created for
it when it's modified mid-frame, or a resource that's created and destroyed
all within one frame.
* This is only intended to handle the case where a new program is created mid
frame and linked for the first time, and we need the initial contents chunk to
get location translation among other things. We don't yet handle programs
being re-linked multiple times mid-frame.
* glUniformBlockBinding can be changed at runtime and previously pushing all
instances of it into the resource record means it would be overwritten by any
bindings retrieved by the initial contents. That's fine (if redundant) if they
aren't changed afterwards, but if they are changed then this will be wrong.
* If we only copy the slot contents without converting Vk* handles to IDs then
we run the risk that the resource will be deleted and re-allocated mid frame
before we do that at serialise time.
* Instead we fetch IDs immediately and serialise as IDs, then look up the
handles on replay
* Instead of passing the resource handle itself to GetSize_InitialState or
Serialise_InitialState, we pass the Id, ResourceRecord, and prepared initial
contents. All of these can survive past the destruction of the resource.
* Removes the need for AllowDeletedResource_InitialState() - it's always allowed
now.
* Need_InitialStateChunk is also refactored but it's only used on D3D11
currently and potentially will be removed in future.
* This was used for two things:
- UAVs on D3D11, which we can just mark dirty at creation as we do
with things on D3D12/Vulkan where we know we'll always want initial
states.
- Texture views/Texture buffers on GL, where we check if the texture
was referenced and force initial states for the underlying data
store. This requires a bit more work but can still be achieved by a
GL-specific force-inclusion pass on the frame references.
* The problem with trying to keep the list of dirty resources identical at the
start and the end of the capture is that resources being deleted or dirtied
mid-frame causes problems. For the latter we have 'pending dirty' ugliness,
for the former we weren't properly handling it in all cases. Instead just
prepare initial contents from dirty resources, then use the list of resources
that had initial contents prepared to determine which should be saved.
* This means resources freed mid frame are fine, as long as we hold onto their
resource records and initial contents which we do. It also means the pending
dirty handling can be removed and we can just dirty resources as soon as we
want - it will be ignored mid-frame and apply to subsequent frames.