* 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.
* On mac on legacy contexts (GL2.1) glGetStringi will understandably fail
completely, so we can't expect to be able to use modern enumeration of
extensions on the assumption that it's really a compatibility context.
* Even if the driver doesn't support it (i.e. on macOS) we can still allow
applications to name objects and add frame markers, they just won't get any
debug output.
* When you do glTexImage2D(GL_TEXTURE_2D) it should refer to the last 2D texture
bound to the currently active unit, even if a 3D or other type of texture was
bound in between. Previously we only tracked per-unit and ignored the type.