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>
This commit is contained in:
1 parent
a2333c8223
commit
a6e163e9aa
7 files changed
+392
-121
No files matched your search
@@ -903,6 +903,11 @@ voelinctl stream bench --res 2560x1440 --fps 30 \
|
||||
# The pattern handed over as DMA-BUFs, as the portal hands over the screen
|
||||
# (Linux, /dev/udmabuf): with VA-API encoders the GPU path, no portal needed
|
||||
voelinctl stream bench --res 2560x1440 --fps 60 --encoder h264_vaapi --dmabuf
|
||||
# The same from buffers in video memory in the driver's tiled layout, drawn
|
||||
# in advance (eight frames in turn), as a compositor hands them over: the
|
||||
# udmabuf ones are ordinary memory the GPU reads over the bus several times
|
||||
# slower, and /dev/udmabuf refuses more than 64 MiB (7680x4320 is 132 MiB)
|
||||
voelinctl stream bench --res 7680x4320 --fps 60 --encoder av1_vaapi --vram
|
||||
# A real screen capture instead of the pattern (the portal asks the user;
|
||||
# --start-timeout bounds the wait so it cannot hang):
|
||||
voelinctl stream bench --source portal --fps 60 --encoder h264_vaapi
|
||||
|
||||
Reference in new issue
Block a user