Skip to content

fix(linux): export all Wayland DMA-BUF planes - #5699

Open
ReenigneArcher wants to merge 1 commit into
masterfrom
fix/5671
Open

fix(linux): export all Wayland DMA-BUF planes#5699
ReenigneArcher wants to merge 1 commit into
masterfrom
fix/5671

Conversation

@ReenigneArcher

@ReenigneArcher ReenigneArcher commented Sep 12, 2026

Copy link
Copy Markdown
Member

Description

Modifier-aware GBM allocation can return multi-plane buffers, but the wlroots capture path only described plane zero to linux-dmabuf. Query and export each plane fd, stride, and offset, then add every plane to the Wayland parameter object.

Allocate modifier-backed buffers with rendering usage and close exported descriptors when export or asynchronous buffer creation fails.

Add unit coverage for multi-plane metadata, unsupported plane counts, and partial-export cleanup.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@ReenigneArcher ReenigneArcher added this to the stable release milestone Sep 12, 2026
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.55556% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.79%. Comparing base (2ebaae3) to head (fcdd9e2).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/wayland.cpp 55.55% 14 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5699      +/-   ##
==========================================
+ Coverage   37.67%   37.79%   +0.12%     
==========================================
  Files         104      104              
  Lines       26103    26130      +27     
  Branches    11561    11569       +8     
==========================================
+ Hits         9834     9877      +43     
- Misses      12569    14779    +2210     
+ Partials     3700     1474    -2226     
Flag Coverage Δ
Alpine-aarch64 22.78% <57.14%> (+0.19%) ⬆️
Alpine-x86_64 22.90% <55.17%> (+0.19%) ⬆️
Archlinux 21.50% <55.17%> (+0.20%) ⬆️
FreeBSD-amd64 23.70% <55.55%> (+0.21%) ⬆️
Homebrew-macos-15 37.27% <ø> (ø)
Homebrew-macos-26 37.58% <ø> (ø)
Homebrew-ubuntu-24.04 24.78% <57.14%> (+0.19%) ⬆️
Linux-AppImage-aarch64 26.05% <59.25%> (?)
Linux-AppImage-x86_64 26.27% <57.14%> (+0.22%) ⬆️
Windows-AMD64 30.42% <ø> (ø)
Windows-ARM64 25.46% <ø> (+<0.01%) ⬆️
macOS-arm64 30.81% <ø> (ø)
macOS-x86_64 31.43% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/linux/wayland.h 11.11% <ø> (+5.55%) ⬆️
src/platform/linux/wayland.cpp 20.06% <55.55%> (+12.84%) ⬆️

... and 51 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ebaae3...fcdd9e2. Read the comment docs.

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Last Updated 2026-09-13 00:59:02 UTC
Source Run CI Run #5506
Commit fcdd9e2e980b499a4eec5514b03f5bc58df2c333

Screenshot Comparison

PR #5699 screenshots vs screenshots baseline.

Matrix: AppImage-aarch64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: AppImage-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-AMD64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-ARM64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-arm64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Modifier-aware GBM allocation can return multi-plane buffers, but the wlroots capture path only described plane zero to linux-dmabuf. Query and export each plane fd, stride, and offset, then add every plane to the Wayland parameter object.

Allocate modifier-backed buffers with rendering usage and close exported descriptors when export or asynchronous buffer creation fails.

Add unit coverage for multi-plane metadata, unsupported plane counts, and partial-export cleanup.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant