Files
VoelinClient/tools
selikhovandClaude Opus 5.5 a6e163e9aa Bench the GPU path from buffers in video memory, as a compositor's are
The test pattern's DMA-BUFs came from /dev/udmabuf: ordinary memory,
which the GPU reads over the bus. Measured on the Radeon RX 7900 GRE
(`gpu_conversion_cost`, new, ignored): converting a 3840x2160 RGB buffer
to NV12 took 9.7 ms from such a buffer against 0.16 ms from one in video
memory in the driver's tiled layout, and 4.0 against 0.09 ms at 1080p;
the import itself costs 0.01-0.02 ms either way. So the bench showed the
GPU path at 4K240 stuck at 70 fps waiting for the bus, which no real
capture does. udmabuf also refuses buffers over 64 MiB, so 7680x4320
(132 MiB) could not be benched on the GPU path at all.

`SyntheticScreen::with_video_memory` (`StreamerConfig::
synthetic_video_memory`, `voelinctl stream bench --vram`) draws eight
frames of the pattern in advance into VA-API surfaces of the driver's
layout, exported as DMA-BUFs and handed over in turn, as a compositor
hands over the screen; a sink that declines them gets memory frames as
before. The exported surface was a test helper and is now crate code
(`ffmpeg::Exported`). With it, from a dev build: 4K240 AV1 at 60 Mbit/s
236.8 fps with 0.31 ms on the GPU per frame and 0.03 cores; 8K60 60.0 fps,
1.01 ms, 0.01 cores, the encoder's 16.5 ms per frame the limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 04:18:53 +03:00
..