Change hooking to use link time symbol address instead of runtime dlsym
Since OSX12 dlsym(RTLD_NEXT,...) returns the interposed symbol not the real symbol
* When a port is specified (with the usual :12345 suffix on the hostname) we use
that for remote replay connections. We disable target control enumeration
since that requires a port _range_ and captured applications self-assign those
ports. Those can still be accessed via a normal unsuffixed remote specifier -
even if there is no remote server running on the default port.
* Extensions will likely not be exported as real symbols, so we need to handle
the case of needing to fetch the onward pointer via eglGetProcAddress.
* We do this for non-extensions too, to try to fetch core functions that are
still NULL after hook initialisation. Since we do wholesale dlopen/dlsym
replacement on linux we cannot handle the case where an application checks for
function validity via just normal dlsym returning something, but then the
function doesn't exist in the real libEGL.so. We have no way of reporting that
the function actually doesn't exist because we have nowhere to call, and it
will crash. Trying to fetch the pointer via eglGPA is unlikely to succeed but
should do no harm as we don't set these function pointers anywhere else.
* The descriptor needs to be valid even if it's not used, when not using
descriptor indexing rules, so ensure the IB buffer is at least some minimum
size.
* Originally the idea was that on first use in a Loading pass we'd transition
from preinitialized to whatever the application wanted, and then subsequently
on repeated replays it would be left in general. However this doesn't account
for initial contents and initial frame states, which will end up putting the
image in GENERAL anyway. This is fine as it still satisfies the requirements
if needed.
* When we're splitting every draw and execute to get pre- and post-mod colours,
we resume renderpasses with load RPs for obvious reasons. The inheritance info
needs to match in secondary command buffers, so we force it over
conditionally.
* Any pipeline that uses DRef on images (without descriptor indexing at least,
which we don't assume) must be passed depth-formatted images. This includes
the dummy images we bind to other slots.
* At the same time we limit depth textures to just 1D, 2D, 2DMS - ignoring 3D
and Cube.