* On AMD's driver at least the reflection for a separable vertex program
includes all declared outputs even if they're statically not written in the
vertex shader. However trying to use these as XFB varyings fails.
* Unfortunately this makes it impossible for us to use our typical reflection to
determine what outputs to write, so instead we make a last ditch attempt to
get things working and link the non-separable program we're about to use for
XFB and reflect that again, then use the reflection to remove items from the
varyings and replace them with gl_SkipComponentsN.
* Skia had a bug (which has been fixed) where it would incorrectly check for
glGetError() to see if glProgramBinary() had succeeded. This is completely
wrong and it should be checking the link status. When RenderDoc silently
dropped the function call to leave the link status as invalid, Skia deleted
the program and then tried to use it anyway leading to incorrect rendering.
* Potential other fixes in order of preference:
- Spec-compliant: Return a random program binary format each time the
program runs. This should prevent a correctly-written program from
re-using cached binaries, but of course Skia ignores the binary format
and uploads it anyway. We'd hit the same broken error check and we're
back to square one.
- Spec-compliant: Write a program binary format of our own that embeds all
the shader source and replays it again. Would be valid and work, but is
very complex.
- Non-spec-compliant: Fake the error code that Skia is looking for. In a
program which is written correctly we then poison glGetError() and cause
unpredictable and possibly serious errors elsewhere.
* Instead we just return 0 for GL_NUM_PROGRAM_BINARY_FORMATS on Android, and
Skia turns off its caching entirely. This is not spec-compliant either since
the spec requires at least one format in the list that is returned by
glGetProgramBinary, but if the Android OS is going to break the spec at us
then we'll break it right back.
* Bottom-line: Android is an absolutely horrible operating system that is broken
at every turn and no-one should be forced to deal with it.
* The defaults can be configured from the settings menu, and there's a new "Open
Capture with Options" menu option to open a capture with different options
temporarily.
* On GL this is purely informational, but on D3D11 and D3D12 we use this to
select the closest available adapter on replay, as we already do on Vulkan.
* Fixes a crash when looking at certain draws in No Man's Sky, which
apparently sometimes binds a descriptor set with fewer bindings than the
layout specified.
* DX11 in feature level 11 didn't support these, but newer feature levels add
additional support that requires decode/encode and truncation to the right
width