* Crash report was submitted indicating a crash here, which is either
memory issues or momentarily crazy-large window. We can catch the
exception and just clear to black.
* Until I have a sample that uses it, I'm not going to attempt to serialise
the tiled resource API. It has a lot of other potential knock-ons too
(e.g. to initial contents).
* Previously we were saving every program uniform that got set,
cumulatively.
* Now, whenever a uniform is set that program is marked as dirty and we
fetch out the uniform values at the start of the frame and serialise them
out.
* On replay, we create a dummy copy of the program to hold the initial
uniform values, and copy them across to restore the frame-start values.
* GL_TEXTURE_COMPRESSED_IMAGE_SIZE glGet value gives you the size for all
faces on this mip, but we fetch the image data face-by-face, so it needs
a /6.
* This is the first attempt at backwards logfile compatibility. Since most
captures are fairly ephemeral I don't know to what degree I'll go in
future to support old captures, but since this was a fairly trivial
example (just skip serialising a bit of data if it's an old version
without it), I'll test this out.
* ld_ms has 4 operands but the operand in [3] is not a sampler and won't
have any indices.
* Speculative fix for a crash report uploaded with a crash here on a ld_ms
* Essentially when streamout'ing to a buffer a hidden counter is saved with
it that contains the number of primitives written.
* With this change we issue queries over each buffer's duration as a
stream-out target so we have those counters available when necessary.
* At the start of frame capture, we save out the current value of all those
queries, and use them if that buffer is used for a DrawAuto() without
being streamout'd to again in the captured frame.
* If a pixel unpack buffer is bound, we mark the resource as dirty when
idle. When capframing we serialise just the pointer value as offset, not
the buffer contents.