Skip to content

feat(compositor): the Linux pass of shader effects - #1207

Closed
EtienneLescot wants to merge 0 commit into
integration/shader-effectsfrom
feat/shader-effects-linux
Closed

EtienneLescot wants to merge 0 commit into
integration/shader-effectsfrom
feat/shader-effects-linux

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Linux pass of agent-written shader effects: the wgpu compositor now draws them, as the Windows one does since #1199. This is section L.4 of docs/shader-effects.md. Stacked on #1199: it only needs that PR's Rust, not the document of #1202.

  • Same behaviour as Windows. Three targets (image, text on a transparent text layer, both), lanes, a 64-entry cache. The export waits for a pending compile; the live view skips the effect until it lands, then recomposes (live.rs now turns that on for Linux too).
  • Compilation off the render thread. The WGSL goes to wgpu as it is. A background thread builds the shader module and the pipeline against an explicit layout of the prelude's four bindings.
  • One new rule in the contract, on every OS. wgpu panics on a validation error, since no on_uncaptured_error is set. analyze now refuses any @binding the prelude does not declare, with its line, so nothing invalid reaches wgpu. A panic would only kill the compile thread anyway, leaving the effect undrawn.
  • check_for_agent translates the effect to SPIR-V on Linux, as wgpu will.
  • Docs. The known gap in native-compositor.md now says macOS only; the spec (D.5, C.7, H.2) and rendering-performance.md get the Linux details and the lavapipe calibration.

Without a GPU, effects are expensive. On lavapipe a frame() read costs about 1.4 ms per 1080p frame, 350 times an RTX 4070 Ti: a light effect already doubles the frame time. The tiers keep their order.

Related issue

None.

Type of change

  • Feature
  • Documentation

Release impact

Desktop impact

  • Linux
  • Windows: the new binding rule only
  • macOS: the new binding rule only, no pass yet

Testing

On lavapipe under WSL (nix compositor-view shell, Mesa's lvp ICD):

  • The six GPU tests of the Windows pass, ported to compositor_linux.rs: region repaint, preview non-blocking then shader_fx_landed, broken / extra-binding / unknown-contract effects leave the frame untouched, colour parameter, lane order, the three targets. Run with --nocapture: none skipped.
  • cargo test -p openscreen-compositor --lib --tests: all green (479 unit tests, plus the integration tests).
  • shader_fx_tier_calibration in release (OPENSCREEN_FX_BENCH=1) for the numbers above.

On Windows: cargo test -p openscreen-compositor --lib shader, 28 tests green.

Not run: the app end to end on a Linux desktop, and an integrated GPU.

🤖 Generated with Claude Code

@EtienneLescot
EtienneLescot requested a review from Beetix as a code owner October 14, 2026 14:33
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 98ad6ad9-d6b6-4c4f-a9be-179630cceea1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EtienneLescot
EtienneLescot changed the base branch from feat/shader-effects-contract to integration/shader-effects October 14, 2026 15:54
@EtienneLescot
EtienneLescot force-pushed the feat/shader-effects-linux branch from 9ab07ce to a607e20 Compare October 14, 2026 15:55
@EtienneLescot

Copy link
Copy Markdown
Collaborator Author

Integrated into integration/shader-effects as a607e20: the same change, replayed on current main. GitHub closes, rather than marks merged, a PR whose head is already in its base. It reaches main through #1210.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant