* 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.
* glTexImage probably makes some assumptions about usage, at the least it
assumes that it won't be called to re-size/re-allocate textures (that
will probably break), and it also assumes that level 0 will always be
glTexImage'd and the other levels are standard mip sizes (I don't know
what happens in GL if you specify non pow-2 descending mip sizes for
different levels. Given we're only targetting core 3.2 and above, this is
probably a safe set of assumptions.