Open Bug 1943149 Opened 16 days ago Updated 1 day ago

Update WGPU to upstream (week of 2025-01-20)

Categories

(Core :: Graphics: WebGPU, task, P1)

task

Tracking

()

ASSIGNED

People

(Reporter: ErichDonGubler, Assigned: ErichDonGubler)

References

(Depends on 2 open bugs, Blocks 4 open bugs)

Details

(Keywords: leave-open)

Attachments

(11 files, 4 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
No description provided.
Blocks: 1941831

Newer versions of cc reject an unknown target, so we won't be able
to use this approach any more.

Keywords: leave-open
Attachment #9461627 - Attachment description: Bug 1943149 - chore: audit `{metal,naga,wgpu-{core,hal,types}}` 0.23.0 → 0.24.0 r=#supply-chain-reviewers → Bug 1943149 - chore: audit `{naga,wgpu-{core,hal,types}}` 23.0.0 → 24.0.0 r=#supply-chain-reviewers
Attachment #9461627 - Attachment description: Bug 1943149 - chore: audit `{naga,wgpu-{core,hal,types}}` 23.0.0 → 24.0.0 r=#supply-chain-reviewers → Bug 1943149 - chore: audit latest releases of `{naga,wgpu-{core,hal,types}}` (23.*, 24.0.0) r=#supply-chain-reviewers
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8d7fc1a4bd16 chore: audit `hashlink` 0.9.1 → 0.10.0 r=supply-chain-reviewers https://hg.mozilla.org/integration/autoland/rev/aca35d0586bc chore: audit `indexmap` 2.2.6 → 2.7.1 r=supply-chain-reviewers https://hg.mozilla.org/integration/autoland/rev/883fd681a67d chore: audit `libsqlite3-sys` 0.28.0 → 0.31.0, `rusqlite` 0.31.0 → 0.33.0 r=supply-chain-reviewers
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6a816a37e239 refactor(swgl): use env vars. instead of `cc::Build::target` to avoid `*C{,XX}FLAGS*` r=gfx-reviewers,lsalzman
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/404b2c7266c8 chore: audit `cc` 1.0.89 → 1.2.10 r=supply-chain-reviewers
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4567ae997352 build(rust): upgrade `jobserver` 0.1.25 → 0.1.32 r=supply-chain-reviewers
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/21828af6c7d8 chore(swgl): `cargo +1.84 fmt` r=gfx-reviewers,lsalzman https://hg.mozilla.org/integration/autoland/rev/50026351d1c0 chore(swgl): `cargo +1.84 clippy --fix` r=gfx-reviewers,lsalzman
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d7b13e506173 chore: audit `metal` 0.30.0 → 0.31.0 r=supply-chain-reviewers

Okay, so I have an update working locally after a couple of days of effort. It took so long because there were a lot of dependencies to update, and it took me a while to work through everything that needed to be updated.

I haven't posted a WIP patch for the re-vendor of WGPU yet, but I will do that after the spread of current patches in this bug lands. There are still some outstanding things to resolve before I can get those changes landed.

  1. Resolve whether we will be bumping the minimum Rust version for mozilla-central to 1.82 or newer (CC :glandium). If not, we're blocked here, and I need to explore downgrading hashbrown from 15.2 to 14.5.
  2. If (1) pans out, inform folks that work on application-services, update the PR to respect the new minimum Rust version, and get it landed.
  3. Adjust patches to consume the landed PR from (2).

After these, it'll be an otherwise typical review flow.

Try push 1 to test my current changes, squashed into a single revision: https://treeherder.mozilla.org/jobs?repo=try&revision=28b3aecdf756b26d1da825602c92c76ba0f8edd5

Blocks: 1920763

N.B. that this requires Rust 1.82. This is changed in a previous patch
in this patch's stack, and so should be satisfied.

Attachment #9462602 - Attachment description: WIP: Bug 1943149 - build(rust): bump minimum Rust version 1.76 → 1.82 r=#webgpu-reviewers! → Bug 1943149 - build(rust): bump minimum Rust version 1.76 → 1.82 r=glandium
Attachment #9462602 - Attachment description: Bug 1943149 - build(rust): bump minimum Rust version 1.76 → 1.82 r=glandium → WIP: Bug 1943149 - build(rust): bump minimum Rust version 1.76 → 1.82 r=#webgpu-reviewers!
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8c0c09c42a2b chore: audit latest releases of `{naga,wgpu-{core,hal,types}}` (23.*, 24.0.0) r=supply-chain-reviewers
Depends on: 1944676
Attachment #9462602 - Attachment description: WIP: Bug 1943149 - build(rust): bump minimum Rust version 1.76 → 1.82 r=#webgpu-reviewers! → WIP: Bug 1943149 - build(rust): bump minimum Rust version 1.76 → 1.83 r=#webgpu-reviewers!
Attachment #9462602 - Attachment description: WIP: Bug 1943149 - build(rust): bump minimum Rust version 1.76 → 1.83 r=#webgpu-reviewers! → Bug 1943149 - build(rust): bump minimum Rust version 1.76 → 1.83 r=glandium
Attachment #9462602 - Attachment description: Bug 1943149 - build(rust): bump minimum Rust version 1.76 → 1.83 r=glandium → Bug 1943149 - build(rust): bump minimum Rust version 1.76 → 1.82 r=glandium
Depends on: 1945020

Comment on attachment 9462602 [details]
Bug 1943149 - build(rust): bump minimum Rust version 1.76 → 1.82 r=glandium

Revision D236028 was moved to bug 1945020. Setting attachment 9462602 [details] to obsolete.

Attachment #9462602 - Attachment is obsolete: true

In upstream, a new heuristic for detecting compiler families in
cc::Tool was introduced. The heuristic we originally patched upstream
is now the fallback heuristic, and does not get used for our clang
compiler. This causes our interaction with default flags and
cc::Tool::is_like_msvc to be incorrect in swgl, since clang's CLI
to use cl-like arguments, and rejects clang-like arguments.

Work around this by detecting checking Tools' base command and
"wrapper arguments" to see if we're (1) using clang and (2) we have
a wrapper argument matching --driver-mode=cl. If so, provide cl-like
arguments in swgl, rather than clang-like arguments.

Attachment #9462603 - Attachment description: WIP: Bug 1943149 - build(rust): upgrade `cc` 1.0.89 → 1.2.10 r=#supply-chain-reviewers → Bug 1943149 - build(rust): upgrade `cc` 1.0.89 → 1.2.10 r=#supply-chain-reviewers
No longer depends on: 1944676
Depends on: 1945527
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d1cb92f43de1 build(swgl): work around broken (upstream) `cc::Tool` detection of `clang --driver-mode=cl` r=gfx-reviewers,nical

In upstream, a new heuristic for detecting compiler families in
cc::Tool was introduced. The heuristic we originally patched upstream
is now the fallback heuristic, and does not get used for our clang
compiler. This causes our interaction with default flags and
cc::Tool::is_like_msvc to be incorrect in swgl, since clang's CLI
to use cl-like arguments, and rejects clang-like arguments.

Work around this by detecting checking Tools' base command and
"wrapper arguments" to see if we're (1) using clang and (2) we have
a wrapper argument matching --driver-mode=cl. If so, provide cl-like
arguments in swgl, rather than clang-like arguments.

Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/18a4b3819fd8 build(swgl): work around broken (upstream) `cc::Tool` detection of `clang --driver-mode=cl` r=gfx-reviewers,nical
Attachment #9463601 - Attachment is obsolete: true
Flags: needinfo?(egubler)
Blocks: 1945694

Comment on attachment 9463665 [details]
Bug 1943149 - docs(rust): note Rust version as 1.76 for Firefox 136 r=glandium

Revision D236655 was moved to bug 1945020. Setting attachment 9463665 [details] to obsolete.

Attachment #9463665 - Attachment is obsolete: true
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/68af412c331d build(rust): upgrade `cc` 1.0.89 → 1.2.10
No longer blocks: 1945694
See Also: → 1945694

Backed out for causing android build bustages.

Flags: needinfo?(egubler)

Investigating. 😭 Might need help from :jnicol here.

Flags: needinfo?(egubler)
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0993363f6e3c build(rust): upgrade `cc` 1.0.89 → 1.2.10

Backed out for causing android build bustages.

Flags: needinfo?(egubler)
Depends on: 1945694
See Also: 1945694

Comment on attachment 9462603 [details]
Bug 1943149 - build(rust): upgrade cc 1.0.89 → 1.2.10 r=#supply-chain-reviewers

Revision D236029 was moved to bug 1945694. Setting attachment 9462603 [details] to obsolete.

Attachment #9462603 - Attachment is obsolete: true
Blocks: 1945527
No longer depends on: 1945527
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: