DescSetLayout::Init can crash when Immutable Samplers are provided.
When the vector containing the Binding info is resized, the pointer to
immutableSamplers is copied and then deleted in the old copy.
A copy constructor has been added to the Binding struct.
Fixed indexing in DescSetLayout::Init
* There were inconsistencies that could lead to off-by-one or
missampling in some cases when applying a slight offset to ensure we
sample the selected slice of the texture.
* E.g. internally SwapBuffers might call wglSwapBuffers which we also
hook, and we'd process it twice redundantly. Only process the first
one we come across, whichever that is.
Since GLES does not support glGetCompressedTexImage function, the
compressed data cannot be extracted. For solving this, we store
them at glCompressedTexImage* calls, and use these data when
required (however it is not necessarily correct).
* Mesa requires that we precisely specify it, and won't convert from
'floating point' GL_RED. Although I'm not sure what that means with
GL_RED and GL_UNSIGNED_INT...
* Otherwise it could interfere with normal functioning. Especially if we
run a script that then runs ls or dirname or pwd or something, and we
start printing logging messages! Oops.
* We need to use file locks to ensure the last process knows it can
delete the log, as well as delete any inherited file descriptors when
forking to launch a new executable.
* To accomplish this, tracking the single logfile handle is now part of
the OS-specific code instead of common logging code. It makes little
difference either way as we don't support multiple log files.
* Sometimes a process can take a while to start, this change waits up
to 1+2+4+8+16+32+64 = 127 ms which is still not that much.
* Also log a message if we still can't find it, so it's clear what the
problem was.
* In theory, gl*GetProcAddress can return different function pointers
at different times, but in practice this does not happen. Also we have
many more problems if there was an implementation that did this.
* In reality what can happen if we don't preserve existing function
pointers is that any call to gl*GetProcAddress will overwrite
required emulated functions for e.g. EXT_dsa if the implementation
doesn't support the extension but does return valid pointers for the
query.