Files
reims-vgpu/docs/video
Anees Iqbal 86fb64412d 🐛 Hand the NVIDIA arm's runtime to its crate as it opens
The NVIDIA crate's threads and waits run on the runtime it is first handed,
and only the Annex B decoder handed one. A QEMU whose first NVIDIA video was
an NVENC encode session, before any decode session, made its encoder's lock
thread and waits on the crate's fallback: std's threads, outside the
library's, and no exit gate, so a call in NVENC or CUDA could run beside
the driver's exit-time destructors as the process ended, the class of the
exit aborts the gate exists for.

NvidiaVideo::new now hands its runtime to the crate (nvidia::use_runtime,
public) before it opens the GPU, as a VA display takes its runtime as it
opens, so every session kind runs on the platform's threads and clock, and
the crate arms the platform's exit gate as CUDA loads.

A test on the NVIDIA host opens the arm in a child process of its own, makes
an NVENC encoder before any decoder and encodes a frame: NVENC's lock thread
is started by the runtime the arm was opened with. Nothing the guest sees
changes; an encode-first QEMU's NVENC threads are now the library's.
2026-11-14 21:58:38 -08:00
..