* Instead of baking these into the overlay texture and trying to decode them
afterwards, we instead write a grayscale 16F value into the overlay texture,
and add a special decode display mode that will use the heatmap and bucketing
provided.
* This means that saving these overlay textures now saves grayscale. When saving
to an 8-bit format, we remap to 0-255 so that greater than 1.0 values are
mapped lower.
* Due to the way we render the triangle size overlay we don't respect state
changes mid-way through a pass, but we should at least correctly use the
viewport from the start of the pass.
* We only need to check for it in intercept_dlopen to return a consistent handle
to our own library regardless of how the library is opened, to prevent
multiple copies of the library being loaded.
* On the light theme we use a less dark background colour improving contrast
with the text.
* On the dark theme the background is still super dark, but we dim the outline
colour which provides an indication of disabled stages
* Since vkCmdCopyBuffer can't run inside a renderpass we have to delay it until
the renderpass ends. Warn if there is a subpass dependency that would allow
writing the indirect args inside the RP (which we would then miss)
* This means that things will work successfully even if the 'executable' is
actually e.g. python3 in a system directory and nowhere related to where the
renderdoc library is.
* This ensures we don't serialise a pointer to client memory which is non-
deterministic. The value isn't used, we will readback the actual data at draw
time and replace with client-memory buffer updates.
* When calling the register() function there is no frame or globals, so we need
to set an internal handle external to that.
* This means functions that get wrapped know that there's a global handler for
exceptions, which just prints to the log. Otherwise they think they're running
synchronously and write to an invalid exception handling object.