* It's possible to replay with descriptor set slots (and updates)
referring to resources that don't exist at replay time, if those sets
are never actually used in a queue that's submitted and the resource
isn't referenced otherwise. For this reason we need to be able to
skip initial contents or descriptor updates that refer to these
unused resources.
* This is going to be difficult to debug and verify without the layer
to debug and verify that all transitions are correct (both on the app
side and renderdoc's replay side). For now, disable the assert and
just hope that the app got it right and we replay it right.
* Device memory is always treated as dirty from creation. This means
we will always prepare_initialstate for all memory.
* We no longer force initial states for all memory.
* Instead we iterate over all frame ref'd objects, and then ref their
memory records - for framebuffers and view objects, we frame ref their
parents so that they can in turn frame ref their memory record.
* In future this should be built up at creation time and just iterated
whenever we want to ref any of these objects (all the way down to mem)
* Any non-linear images need to be copied into a linear image for
readback. Otherwise the device memory will not necessarily be in the
right format for replay.
* I misunderstood how descriptor sets were used - they are allowed to be
dereferenced anywhere between cmd buffer record time and when
execution finishes. I thought they were only ever dereferenced during
exec. So it means we must preserve cmd buffer ordering vs. queue
submit and descriptor update. We still want to force cmd buffers into
the start of the frame that were recorded pre-frame though.
* The same ICD in the SDK just returns '1' as the handle for all caches.
* This could be valid behaviour (not for caches but for other objects)
so need to check where this could happen and handle it. We already do
for queues, physical devices, and a couple of others.
* I ran into a problem where &vkGetInstanceProcAddr etc were returning
the loader functions and inducing an infinite loop. I'm not sure it's
defined which is returned, since librenderdoc.so also links against
the loader for replay, so instead we take advantage of being able to
define RenderDocGetInstanceProcAddr and have that loaded up by the
loader.