Files
VoelinClient/crates
faumarayandClaude Opus 5 000eb321ac voelin-media: put a real DMA-BUF through the VA-API encoder
The probe reported the zero-copy import as available on the strength of the
struct offsets alone, and screen capture only ever hands over RGB, which the
import refuses, so no buffer had ever gone through it on hardware.

Make a VA-API surface, export it as a DRM PRIME DMA-BUF and feed it back to
a second encoder through encode_dmabuf. On this GPU it imports and encodes,
and the buffer carries an AMD tiling modifier (0x200000028a01f04), so tiled
buffers work and not only LINEAR ones.

It also showed that the import's shape is narrower than what drivers
produce: this driver describes an NV12 surface as two DRM layers, R8 for the
luma plane and GR88 for the chroma one, while encode_dmabuf takes a single
NV12 layer with two planes, which is how a compositor hands one over. Both
name the same bytes of the same buffer object, so the test flattens the
layers; whoever wires the portal to the encoder should accept either form.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 23:31:45 +03:00
..