Skip to content

Handle color state for direct scanout#15229

Open
NotPppp1116 wants to merge 3 commits into
hyprwm:mainfrom
NotPppp1116:debug-hdr-issue
Open

Handle color state for direct scanout#15229
NotPppp1116 wants to merge 3 commits into
hyprwm:mainfrom
NotPppp1116:debug-hdr-issue

Conversation

@NotPppp1116

Copy link
Copy Markdown
Contributor

Description

Part of #9064.

This updates direct scanout so fullscreen color state is applied before attempting scanout, and so the output state is rolled back if scanout cannot be committed. When the scanout buffer is unchanged but the color state changed, the direct scanout path now commits the same buffer update instead of presenting feedback without applying the new output state.

It also blocks SDR direct scanout when luminance conversion would be required. CTM can cover compatible primaries, but direct scanout bypasses shader luminance conversion, so luminance mismatches need to fall back to the composited path.

User impact

  • HDR fullscreen clients can direct-scanout with their HDR metadata applied to the output state.
  • SDR/HDR transitions around direct scanout keep the output color state in sync.
  • Direct scanout no longer silently skips required SDR luminance conversion.

Validation

  • cmake --fresh -S . -B build
  • cmake --build ./build --target Hyprland -j2
  • git diff --check

Note: the fresh CMake configure was needed because the local build cache still referenced an older Abseil library name (absl_borrowed_fixup_buffer) after the system packages had already moved on.

@NotPppp1116 NotPppp1116 marked this pull request as ready for review June 25, 2026 12:20
@UjinT34

UjinT34 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

DS SDR luminance differences are negligible unless DS is toggled back and forth. At least keep a way to ignore this diff with a config setting.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants