Hardware Video Path
PlannedFull hardware path for video playback with zero format conversion
Hardware Video Path
Waxed needs to be smart about the available hardware planes a GPU has. In general, there’s at least 1 primary layer, 1 overlay layer, and 1 cursor layer. The plan is for normal rendering to happen on the OVERLAY layer - this is where the compositor does all its compositing.
Layer Structure
| Layer | Purpose |
|---|---|
| Primary | Reserved for video content |
| Overlay | Compositor rendering (UI, windows, etc.) |
| Cursor | Hardware cursor |
This keeps the primary layer available for different rendering targets, allowing a video (browser, media player, anything) to play directly on the primary layer.
Zero Format Conversion
The caveat: content being played needs to match one of the pixel formats the hardware plane supports. Combined with hardware video decoding, this creates a full hardware path with zero format conversion - not even NV12 to RGB.
How It Works
- Compositing layer renders everything normally
- A “hole” is left where the video should appear
- Primary plane displays video at that exact position
- Hardware handles everything - no CPU copy, no format conversion
Hardware Scalars Bonus
This logic automatically takes advantage of hardware scalars. Full hardware video playback with near-zero CPU usage, even for 8K video. If your hardware can decode it, it can follow the hardware path.
Requirements
- GPU with multiple hardware planes
- Hardware video decode support (h264/h265/AV1)
- Vulkan Video support for the codec (VAAPI may be an option too)
- Primary plane supporting the video’s pixel format
Automatic Detection
Waxed will detect the available hardware layers automatically and apply this logic when possible. No manual configuration needed - if your hardware supports it, it just works.
Plugin Communication
Waxed tells the plugin about the layer structure so compositing can still access data from other layers when needed. For example, if something needs to be blurred across planes (like a translucent overlay over video), the plugin has the information it needs to handle that correctly.
Not Just Video
This also supports static content in non-RGB formats. Any content that matches a hardware plane’s native format can take the zero-conversion path, not just decoded video.
Practical Example
Playing an AV1 video in a browser:
- Browser requests video decode via Vulkan Video
- Decode outputs directly to primary plane
- No CPU touches the frame data
- Overlay plane composits browser UI around it
- Result: butter-smooth 8K playback
Related Features
- DRM Planes - Hardware plane management
- Vulkan 1.3+ - Graphics API
- Per-Display Refresh - Independent display timing