* In particular, we don't want to hold this lock while potentially
calling FreeLibrary as that could try to acquire the loader lock that
another thread might be holding while waiting on our lock.
* The user is responsible for making sure they don't break anything by
getting the real interface - ie. not querying for anything else.
Likewise the normal ability to record debug messages will be changed
if they add any filters or retrieve messages before RenderDoc records
them when capturing.
* API Validation still must be enabled via RenderDoc's capture options
before device creation, one way or another.
* This also applies to stencil even in non-multisampled images.
* Serialisation applies to both network proxying data, initial frame
contents at the beginning of a captured frame, and saving images to
disk.
* It was using the last bound render target, which could be empty if
state was reset before presentation. Instead we use the copy target
listed in the present drawcall as the actual swap buffer presented to.
* DDS will always save the format entirely literally, and the float
formats do not support alpha processing currently.
* TGA and PNG will either discard the alpha and write entirely opaque,
or they'll include it in the file. Blending to colour or checkerboard
is not supported.
* Using OS-specific append writing functions instead of simple fopen/
fwrite/fclose we can guarantee that multiple processes writing to the
same log file won't trash or interleave their log output.
* To make the logs readable the PID is now included along with the
project/timestamp.
* After that, we make sure that when we launch a program we set the
output log to the same file as the parent UI. This keeps all the logs
together and removes user confusion over which logfile is needed.
* We also move all of RenderDoc's temporary files under a RenderDoc
folder in the temp folder, instead of scattering the files in the root
* This should at least support the swapping of the current pipeline
state but it probably won't support all the weird 'emulate different
D3D versions' stuff.
* Without this, a cast from WrappedID3D11DeviceContext to
ID3D11DeviceContext3 will not properly adjust the vtables so the
returned pointer will be invalid.