Skip to content

Upgrade wgpu and naga to 30, accesskit to 0.25 - #2

Closed
chris-addison wants to merge 1 commit into
unity/dependency-cleanupfrom
unity/wgpu-30-accesskit
Closed

chris-addison wants to merge 1 commit into
unity/dependency-cleanupfrom
unity/wgpu-30-accesskit

Conversation

@chris-addison

Copy link
Copy Markdown
Collaborator

Stacked on #1 (targets unity/dependency-cleanup).

Changes

  • wgpu 29 → 30.0.1, naga 29 → 30.0.1. The API changes, each handled without changing behavior:
    • SurfaceConfiguration.color_space: set to SurfaceColorSpace::Auto, which wgpu documents as its pre-30 behavior (sRGB, or extended linear sRGB for an Rgba16Float surface).
    • RequestAdapterOptions.apply_limit_buckets: set to false. Limit bucketing is an anti-fingerprinting option for code that exposes wgpu to untrusted content, which native gpui doesn't do.
    • SurfaceTexture::present() became Queue::present(frame).
    • hal::metal::Device::texture_from_raw gained a drop callback: None, as before.
    • Device::create_texture_from_hal gained initial_state: TextureUses::UNINITIALIZED, which is what wgpu-core 29 hard-coded for every wrapped texture.
  • accesskit 0.24 → 0.25.1, with accesskit_consumer 0.39.1, accesskit_macos 0.27.1, accesskit_unix 0.24.0 and accesskit_windows 0.35.1. Before this, Windows used consumer 0.37 while macOS and Linux used 0.38; now there's one. accesskit::Tree was renamed TreeInfo.
  • wgsl-rs validation is no longer on workspace-wide. That feature only backs the #[cfg(test)] validation tests the #[wgsl] macro generates, but it linked wgsl-rs's own naga, still 29 at wgsl-rs's latest commit, into every consumer's normal build. Upgrading gpui to naga 30 would otherwise have left downstream builds with naga 24, 29 and 30.
    • gpui_render, the only crate with #[wgsl] modules, enables it as a dev-dependency, so those 13 generated tests still run.
    • gpui_render's build.rs already validates every pipeline's WGSL with the workspace naga on every build.
    • The one direct wgsl_rs::validate_wgsl_source call, in shaders/tests.rs, now validates with naga 30 directly.

As a result, downstream builds carry only naga 30 plus the deliberate naga-old 24 floor validator. hashbrown 0.15/0.16 and gpu-descriptor also drop out, since wgpu 30 and the new accesskit are on hashbrown 0.17.

objc2 0.5 stays on macOS: even accesskit_macos 0.27.1 still depends on it.

Verification

  • macOS: cargo clippy -p gpui-ce -p gpui_ce_platform -p gpui_ce_render -p gpui_ce_wgpu -p gpui_ce_macos -p gpui_ce_apple --all-targets -- -D warnings is clean. cargo test for gpui-ce, gpui_ce_render, gpui_ce_wgpu, gpui_ce_macos and gpui_ce_apple passes, including the headless GPU primitives and the 13 macro-generated WGSL validation tests.
  • Windows, cross-checked from macOS: clippy with -D warnings on x86_64-pc-windows-gnu, with screen-capture, is clean. The same redundant_clone at gpui_windows/src/directx_renderer.rs that the base commit already has is allowed on the command line for that run.
  • Linux and wasm could not be checked locally, because the Wayland and X11 build scripts need a Linux C toolchain. This PR's CI covers both.
  • cargo fmt --all -- --check is clean.

🤖 Generated with Claude Code

- wgpu 29 -> 30.0.1 and naga 29 -> 30.0.1. API changes: surfaces take a
  color_space (SurfaceColorSpace::Auto, wgpu's pre-30 behavior), adapter
  requests take apply_limit_buckets (false), present() moved to
  Queue::present, metal texture_from_raw takes a drop callback (None) and
  create_texture_from_hal takes the initial state (UNINITIALIZED, what 29
  hard-coded).
- accesskit 0.24 -> 0.25.1, with accesskit_consumer 0.39.1,
  accesskit_macos 0.27.1, accesskit_unix 0.24.0 and accesskit_windows
  0.35.1, so every platform adapter shares one consumer. Tree is renamed
  TreeInfo.
- wgsl-rs: drop the workspace-wide validation feature, which only backs
  macro-generated #[cfg(test)] tests but linked wgsl-rs's own naga 29 into
  every consumer's build. gpui_render enables it as a dev-dependency, and
  its subpixel test validates with the workspace naga directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chris-addison

Copy link
Copy Markdown
Collaborator Author

Landed on unity/a11y-automation by fast-forward to 7b79950, together with #1, so this commit keeps its SHA. Closing, because GitHub can't mark it merged: its base, unity/dependency-cleanup, never received the commit.

@chris-addison
chris-addison deleted the unity/wgpu-30-accesskit branch September 27, 2026 04:45
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