Skip to content

feat: enable Linux Bevy UI lab for lavapipe smoke - #56

Closed
jeffglousher wants to merge 2 commits into
jackControls:mainfrom
jeffglousher:feat/linux-bevy-ui-lab-lavapipe
Closed

feat: enable Linux Bevy UI lab for lavapipe smoke#56
jeffglousher wants to merge 2 commits into
jackControls:mainfrom
jeffglousher:feat/linux-bevy-ui-lab-lavapipe

Conversation

@jeffglousher

Copy link
Copy Markdown
Collaborator

Summary

  • Compile the offscreen bevy-ui-lab HUD (dev-ui-lab) on Linux so Mesa llvmpipe (CPU Vulkan) can capture the production Bevy HUD without a GPU.
  • Proven on Debian with WGPU_BACKEND=vulkan + VK_ICD_FILENAMES=…/lvp_icd.json: adapter llvmpipe (LLVM 19.1.7), 1440×900 PNG.
  • Lab/smoke only. This is not the product GTK/WebKit sibling embed. Linux NativeViewport remains a stub.

Refs #48 (Linux rendering / embed) and #37 (viewport compositor smoke; Linux was out of scope there).

What this is not

Product Linux viewport still needs the GTK/WebKit embed described on #48. This PR only lets the existing offscreen HUD lab compile and run on Linux.

Test plan

  • cargo build --bin bevy-ui-lab --features dev-ui-lab on Debian (no GPU)
  • cargo run --bin bevy-ui-lab --features dev-ui-lab -- /workspace/bevy-ui-linux-sw.png with lavapipe; adapter is CPU Vulkan; PNG is 1440×900 and non-empty
  • macOS/Windows dev-ui-lab still compiles (cfg additive only)

@jackControls please review; do not merge until you sign off.

Compile the offscreen HUD capture on Linux so Mesa llvmpipe (CPU Vulkan)
can prove the Bevy viewport renders without a GPU. Product GTK/WebKit
embed is still jackControls#48.
@jackControls

Copy link
Copy Markdown
Owner

Thanks Jeff — the lavapipe proof is useful. I found one blocker before merging:

The Linux Bevy dependency enables x11, which also enables bevy_winit for every Linux build, even without dev-ui-lab. That makes the offscreen lab depend on an X event loop and conflicts with PR #57’s GTK-embedded native viewport, where Bevy must not own the window/event loop.

Could you remove the x11 feature and add a Linux CI smoke test that builds/runs bevy-ui-lab with lavapipe and verifies the 1440×900 PNG? Ideally run it with DISPLAY unset to preserve truly offscreen behavior.

PR #57 already includes the Linux module/font setup, and the branches currently conflict in Cargo.toml and ui.rs. The cleanest route may be to fold the lavapipe regression test into #57 and close #56 as superseded, or rebase #56 onto #57 and retain only that test.

@jeffglousher

Copy link
Copy Markdown
Collaborator Author

Jack's #57 is the product Linux embed and overlaps the Cargo/mod/ui cfg here. I'll shrink this to the lavapipe dev:bevy-ui:capture script after #57 merges — no need to land both as-is.

@jeffglousher

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #57 (now merged). Jack was right: the Linux x11 Bevy feature would pull bevy_winit into the product GTK embed. Lavapipe stays a CI fallback on #57; no separate lab PR.

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.

2 participants