Add -renderdoc <path> and -renderdoc-frame N[,C], writing one .rdc per selected
dump frame.
RenderDoc's own triggers cannot reach gsrunner on a Wayland session. It polls
only X11/xcb for the capture key, so PlatformHasKeyInput() is false and F12 is
never seen. Target control cannot drive it either: RenderDoc hooks only the core
EGL entry points, while GLContextEGL prefers eglGetPlatformDisplayEXT and
eglCreatePlatformWindowSurfaceEXT, so no native window is ever registered for the
surface and there is nothing to attach a capture to. The in-application API
sidesteps both -- StartFrameCapture(nullptr, nullptr) captures the active device
whatever the windowing system, and needs no keypress, so a headless dump replay
can capture unattended.
Captures open and close at present boundaries in Host::BeginPresentFrame(), which
runs on the GS thread with the frame's work submitted but not yet presented.
RenderDoc must already be in the process, since it installs its hooks from its
library constructor. A late dlopen hands back a working API whose hooks were
never installed and then captures nothing, so that case is refused with the
LD_PRELOAD command to use instead.
Verified on aarch64/Asahi against a God of War II dump. Vulkan surfaceless
produces a valid capture: 351 actions, 218 draws, 99 textures, render target
carrying real image data. Windowed Vulkan cannot work under RenderDoc's layer at
all, which does not advertise VK_KHR_wayland_surface. GL captures record correct
events and texture contents but replay with black render targets on Honeykrisp.
3rdparty/include/renderdoc_app.h is RenderDoc's MIT-licensed in-application API
header, vendored verbatim.