* 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.
* Dynamic descriptor writes that happen after a fence sync must be synchronised
against the work on queues. Since we don't capture CPU-waits on fences we need
to sync on the signal.
* We don't use proxy buffers for anything else so it's safe to ignore other
creation flags. This way we don't get problems with more flexible APIs like
vulkan allowing buffer usage combinations that are illegal on D3D11.
Added a special chunk flag indicating that chunk size is a 64 bit value.
This allows to handle larger chunks (which heppens quite rarely) while
still maintaining backward compatibility with the majority of traces.
Bumped RDC file version of 0x101 (1.1) to make sure older version cannot
read the new file format.
* This is useful when writing automated tests that want to test the output of
rendering which only happens to outputs, such as mesh rendering, or could
potentially be bypassed with direct readback like GetTextureData vs rendering
a texture.
* This suppresses the use of a global try/except to catch exceptions then log &
continue. Instead it runs the test and lets the debugger catch any exceptions
that happen.