Give the Vulkan driver injectable Vulkan calls and a CUDA function table, so
tests can run it on fake Vulkan, GL and CUDA without a GPU.
Move texture creation and the frame handoff steps out of gl_cuda_vram_t, so
the same tests can cover the fallback to mapped planes and the plane copies.
Remove the step that dropped the textures before falling back. A failed
attempt's textures are already deleted by then.
EXT_external_objects requires an image that aliases a GL texture to have the
mutable format bit and every usage its format supports.
Put the allocation behind a driver interface, so tests can run init, allocate,
reset and the fallback to mapped planes without a GPU.
Drain GL errors before the imports, so a stale error can't make a successful
import look failed and close a descriptor that GL now owns.
The fence calls now act on a fence the caller keeps, so the interface no
longer passes it around as void *. The copy loop stops at the first
failure with std::ranges::all_of instead of testing the status in the
loop condition.
Move the per-frame handoff and the GL fence wait into functions that
take their GL and CUDA calls as parameters, and test them with fakes:
the order of GL and CUDA work with two and three planes, every failing
step, and every GL wait status.
The mapped path now unmaps the textures when getting a mapped array
fails, instead of returning with them still mapped.