This change reduces the amount of data copied into VkDeviceMemory resources in
`Apply_InitialState`; this uses the new (interval-based) reference tracking.
On a large capture from a recent game, this change reduces the amount of copied
data from 2.2GB to 720MB (plus 100MB cleared to 0). This reduces the time spent
in `ApplyInitialContents` from 1800ms to 1500ms.
Ranges of memory are initialized/reset by either clearing to 0, or copying in
the initial state data, according to the `FrameRefType`, as follows:
- Read-only (`eFrameRef_Read`) regions of memory are initialized by copying
once, before the first replay.
- Read-before-write (`eFrameRef_ReadBeforeWrite`) regions of memory are reset by
copying before each replay.
- Write-only (`eFrameRef_PartialWrite` and `eFrameRef_CompleteWrite`) regions of
memory are cleared to 0 before each replay. This is intended to avoid possible
user confusion when inspecting these regions of memory, as they might
otherwise show data written later in the frame.
- Unused (`eFrameRef_None`) regions of memory are cleared to 0 once, before the
first replay.
Attachments might be read and/or written. Pessimistically assume attachments are
read and then overwritten. Further analysis should be able to refine this access
type in some cases.
* We now push everything mutable about the draw data configuration into a single
struct which we copy around (the actual buffer data remains refcounted and not
copied). This means that we don't have one thread still trying to do things on
a model which is being updated on another thread.
* This means that allocating >2GB in a bytebuf doesn't crash. There was no good
reason for the int32_t - that dates back to the earliest interop structs
defined for communication with .NET
* We already handle the case where e.g. D3D12_RENDER_TARGET_VIEW_DESC is NULL
and we need to substitute in a typed descriptor for backbuffers. We didn't
handle the case where
Detected two shader compile errors while replaying GLES apps:
1. „#extension directive must occur before any non-preprocessor token” - Fix the order of precisions and extensions in the shader code.
2. „extension 'GL_OES_texture_cube_map_array' is not supported” - Do not add extensions if they are actually not supported. TEXTURE_CUBE_MAP_ARRAY was added to GLES 3.2 so GL_OES_texture_cube_map_array and GL_EXT_texture_cube_map_array are no longer used.
* If we have multiple bindings aliasing the same slot, we want to keep going if
the first one we find is unused to see if the slot is aliased with one that
*is* used. We'll still use the last unused one if we don't find any used at
all (and with aliasing any one we pick is as valid as another).