* On APIs like OpenGL texture formats (like vertex buffer formats) can be
tightly packed even in cases that apparently are otherwise not allowed - e.g.
with fake RGB formats where the stride looks misaligned due to alpha being
hidden.
* This prevents a use-after-free issue when pointers are stored and the backing
storage is deallocated, if the function is entered again we try to get the
previous value to show a variable change an dereference it.
* We only need to force on actual D3D12 resources (buffers and textures) -
enabling the Ref All Resources also would include all pipelines and other
objects which do not need to be included and could be quite wasteful.
* If a resource has usage indicating it's used for any kind of direct
modifications (copies, resolves, rendering, CPU writes) then we know it's
modified. Any resource which has UAV capability may also be modified - since
we don't necessarily track all bindings for bindless, and SM6.6 blows that up.
But any resource that can't be a UAV can only be modified in ways we detect
directly.
* This is a short-term fix, to improve re-applying redundant data to read-only
resources. long term we need to rethink how initial states are handled since
on vulkan and D3D12 initial states are no longer strongly correlated with
resources that need to be reset every replay.
`WrappedVulkan::vkCreateInstance` sets instance extension support based
on whether:
- Extension is enabled
- Instance version >= core version in which ext is promoted
- etc
However, the code that looped through the extensions was inside a loop
over the enabled extensions. If there are no enabled extensions, this
led to extensions promoted to core never being inspected.
The code is split such that enabled extensions are checked within a
loop, and promoted extensions are separately checked.
* Don't process DebugValue that we encounter in scopes other than those where
the variable it's declaring is supposed to be visible. Instead put these in a
queue and process them if that scope is later reached.
* During capture we don't insert references as we're recording descriptor binds,
just once at queue submit time, as an optimisation. However this loses
ordering relative to more direct references. Since descriptor binds are more
conservative (either read, or read before write) we ensure to insert them
first before any direct references like copies or fills which could mark the
resource as completely written before read.