* If a resource isn't referenced anywhere else (ie. isn't then serialised
out to the logfile by default and has no live resource equivalent) we
need to account for this and simply skip the UpdateSubresource. Similar
things are done for CopyResource etc
* This is backwards compatible with old logs as it handles their case with
a "missing" resource
* Basically we want libGL to be loaded second, after librenderdoc. This is
in order to make sure dlsym(RTLD_NEXT) can work.
* This can be done just by order in the ld command. Unfortunately since
renderdoccmd links directly against librenderdoc (rather than LD_PRELOAD)
any symbols exported by librenderdoc resolve, so unless we reference a
function that isn't exported by librenderdoc, libGL won't be linked in
at all.
* I realise this is probably a horrible hack, but it works for now.
* While replaying the initial chunks, we're doing edit type operations but
we haven't serialised out the binding operations in between, so in this
state we do the bind-to-edit binds ourselves.
* Use it to serialise in/out initial state at the start of each captured
frame.
* Serialise active texture and buffer bindings (indexed and non-indexed).
* Tracking the alignment was pointless and it isn't implemented yet anyway.
* Relevant state should be saved at the start of each captured frame, so
include the active texture bindings in this
* These capture options used to be propagated through from the C++ struct
when there was a C++/CLI dll used for interop between C# and C++. Now
that we use P/Invoke this needs to be added back so a couple of default
options can be enabled