Skip to content

Commit c8e0bf0

Browse files
authored
Merge branch 'trunk' into msl-writer-less-pub
2 parents c3ed981 + e68c004 commit c8e0bf0

451 files changed

Lines changed: 31316 additions & 3947 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.deny.toml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,15 @@ skip-tree = [
1111

1212
# glutin and tracy-client-sys use windows-sys 0.52, pulling older windows-targets
1313
{ name = "windows-targets", version = "0.52" },
14-
15-
# winit uses an old version via android-activity → jni
16-
{ name = "windows-targets", version = "0.42" },
1714
]
1815
skip = [
19-
# flume -> fastrand uses an old version only on wasm32
20-
{ name = "getrandom", version = "0.2.17" },
2116
# the ecosystem is migrating from getrandom 0.3 to 0.4, so this captures many stragglers
2217
{ name = "getrandom", version = "0.3.4" },
2318

2419
# Deno uses an old version
2520
{ name = "bincode", version = "1.3.3" },
2621
{ name = "which", version = "6.0.3" },
2722

28-
# Winit uses an old version via android-activity → jni
29-
{ name = "windows-sys", version = "0.45" },
30-
3123
# Winit uses an old version via calloop → rustix 0.38
3224
{ name = "linux-raw-sys", version = "0.4" },
3325
{ name = "rustix", version = "0.38" },
@@ -43,7 +35,9 @@ skip = [
4335
# getrandom 0.3 uses an old version
4436
{ name = "r-efi", version = "5" },
4537

46-
# parking-lot uses an old version
38+
# winit uses this old version
39+
{ name = "redox_syscall", version = "0.4.1" },
40+
# parking-lot uses this old version
4741
{ name = "redox_syscall", version = "0.5.18" },
4842

4943
# deno uses an old version
@@ -52,6 +46,20 @@ skip = [
5246

5347
# drm uses an older version via drm-sys, and a newer version via rustix
5448
{ name = "linux-raw-sys", version = "0.9.4" },
49+
50+
# getrandom -> wasip3 -> wit-bindgen uses an old version but
51+
# getrandom -> wasip2 -> wit-bindgen uses a newer version
52+
{ name = "wit-bindgen", version = "0.51.0" },
53+
54+
# android-activity -> ndk -> jni-sys uses an old version but
55+
# android-activity -> jni -> jni-sys uses a newer version
56+
{ name = "jni-sys", version = "0.3.1" },
57+
58+
# v8 -> bindgen -> itertools uses an old version
59+
{ name = "itertools", version = "0.13" },
60+
61+
# gpu-descriptor and petgraph use an old version
62+
{ name = "hashbrown", version = "0.15.5" },
5563
]
5664
wildcards = "deny"
5765
allow-wildcard-paths = true

.github/pull_request_template.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ person(s) who reviewed your changes. This will make sure it gets re-added to the
2929

3030
**Checklist**
3131

32-
- [ ] Run `cargo fmt`.
33-
- [ ] Run `taplo format`.
34-
- [ ] Run `cargo clippy --tests`. If applicable, add:
35-
- [ ] `--target wasm32-unknown-unknown`
36-
- [ ] Run `cargo xtask test` to run tests.
37-
- [ ] If this contains user-facing changes, add a `CHANGELOG.md` entry. <!-- See instructions at the top of `CHANGELOG.md`. -->
32+
<!-- Note that checking all the boxes is not necessary to open a PR. -->
33+
34+
- [ ] I self-reviewed and fully understand this PR.
35+
- [ ] WebGPU implementations built with `wgpu` may be affected behaviorally.
36+
- [ ] Validation and feature gates are in place to confine behavioral changes.
37+
- [ ] Tests demonstrate the validation and altered logic works. <!-- See `docs/testing.md` -->
38+
- [ ] `CHANGELOG.md` entries for the user-facing effects of this change are present. <!-- See instructions at the top of `CHANGELOG.md`. -->
39+
- [ ] The PR is minimal, and doesn't make sense to land as multiple PRs.
40+
- [ ] Commits are logically scoped and individually reviewable.
41+
- [ ] The PR description has enough context to understand the motivation and solution implemented.

.github/workflows/ci.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ jobs:
244244
uses: Swatinem/rust-cache@v2
245245
with:
246246
key: clippy-${{ matrix.target }}-${{ matrix.kind }}-${{ env.CACHE_SUFFIX }}
247+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
247248

248249
- name: (Linux `aarch64`) Install `aarch64-linux-gnu` `g++`
249250
if: matrix.target == 'aarch64-unknown-linux-gnu'
@@ -334,6 +335,13 @@ jobs:
334335
# If we don't check this then errors inside `profiling::scope!()` will not be caught.
335336
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --benches --all-features --features test-build-with-profiling
336337
338+
# Check wgpu-hal with main backends in isolation to catch missing feature/dependencies activations which may be overlooked when they are dragged in via other features.
339+
# (best effort: in theory we'd need to test all combinations)
340+
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features vulkan
341+
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features gles
342+
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features metal
343+
cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features dx12
344+
337345
# build docs
338346
cargo --locked doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --all-features --no-deps
339347
@@ -409,6 +417,7 @@ jobs:
409417
uses: Swatinem/rust-cache@v2
410418
with:
411419
key: wgpu-msrv-check-${{ matrix.target }}-${{ env.CACHE_SUFFIX }}
420+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
412421

413422
- name: Reduce MSRV on dependencies
414423
shell: bash
@@ -481,6 +490,7 @@ jobs:
481490
uses: Swatinem/rust-cache@v2
482491
with:
483492
key: core-msrv-check-${{ matrix.target }}-${{ env.CACHE_SUFFIX }}
493+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
484494

485495
- name: Reduce MSRV on dependencies
486496
shell: bash
@@ -628,6 +638,7 @@ jobs:
628638
uses: Swatinem/rust-cache@v2
629639
with:
630640
key: test-${{ matrix.os }}-${{ env.CACHE_SUFFIX }}
641+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
631642
workspaces: |
632643
. -> target
633644
@@ -739,6 +750,7 @@ jobs:
739750
uses: Swatinem/rust-cache@v2
740751
with:
741752
key: doctests-${{ env.CACHE_SUFFIX }}
753+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
742754

743755
- name: Run doctests
744756
shell: bash
@@ -770,6 +782,7 @@ jobs:
770782
uses: Swatinem/rust-cache@v2
771783
with:
772784
key: miri-${{ env.CACHE_SUFFIX }}
785+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
773786

774787
- name: Run Miri on selected tests
775788
shell: bash
@@ -811,15 +824,15 @@ jobs:
811824
cargo --locked fmt -- --check
812825
813826
- name: Install Taplo
814-
uses: uncenter/setup-taplo@v1
827+
uses: uncenter/setup-taplo@v2
815828
with:
816829
version: "0.9.3"
817830

818831
- name: Run `taplo fmt`
819832
run: taplo format --check --diff
820833

821834
- name: Check for typos
822-
uses: crate-ci/typos@v1.45.0
835+
uses: crate-ci/typos@v1.45.1
823836

824837
check-cts-runner:
825838
# runtime is normally 2 minutes
@@ -851,6 +864,7 @@ jobs:
851864
uses: Swatinem/rust-cache@v2
852865
with:
853866
key: cts-runner-${{ env.CACHE_SUFFIX }}
867+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
854868

855869
- name: Build Deno
856870
run: |

.github/workflows/cts.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ jobs:
101101
# The version number can be incremented for cache busting.
102102
prefix-key: v3-rust-${{ hashFiles('cts_runner/revision.txt') }}
103103
cache-directories: cts
104+
# Save the cache from the `other` job because it also runs the cts_runner
105+
# integration tests.
106+
save-if: ${{ github.ref == 'refs/heads/trunk' && matrix.suite == 'other' }}
104107

105108
# We enable line numbers for panics, but that's it
106109
- name: disable debug
@@ -112,12 +115,28 @@ jobs:
112115
debug = "line-tables-only"
113116
EOF
114117
118+
# Unlike regular `llvm-cov run`, which builds artifacts in `target/llvm-cov-target`,
119+
# `llvm-cov show-env` uses the regular target directory for artifacts. Because of this,
120+
# this job configures the `install-mesa` and `install-warp` actions with the regular
121+
# target directory, not the `llvm-cov-target` directory.
122+
#
123+
# The `GITHUB_ENV` file is not subject to shell expansion, so we need to un-escape the
124+
# `llvm-cov show-env` output.
125+
- name: Set llvm-cov environment
126+
shell: bash
127+
run: |
128+
cargo llvm-cov --no-cfg-coverage show-env | while read -r assignment; do
129+
key="${assignment%%=*}"
130+
eval "$assignment"
131+
echo "$key=${!key}" >> "$GITHUB_ENV"
132+
done
133+
115134
- name: (Windows) Install DXC
116135
if: matrix.os == 'windows-2022'
117136
uses: ./.github/actions/install-dxc
118137

119138
# Note: `target-dir` is intentionally different from other jobs.
120-
# See note in xtask about `llvm-cov show-env`.
139+
# See note above about `llvm-cov show-env`.
121140
- name: (Windows) Install WARP
122141
if: matrix.os == 'windows-2022'
123142
uses: ./.github/actions/install-warp
@@ -138,7 +157,7 @@ jobs:
138157
run: |
139158
export LLVM_PROFILE_FILE=${{ github.workspace }}/target/wgpu-%p-%m.profraw
140159
export DENO_WEBGPU_BACKEND=${{ matrix.backend }}
141-
cargo --locked llvm-cov --no-cfg-coverage --no-report test -p cts_runner
160+
cargo --locked test -p cts_runner
142161
143162
- name: Run CTS
144163
shell: bash
@@ -150,7 +169,6 @@ jobs:
150169
run: |
151170
set -e
152171
153-
source <(cargo llvm-cov --no-cfg-coverage show-env --sh)
154172
cargo --locked llvm-cov report --lcov --output-path lcov.info
155173
156174
- name: Upload coverage report to Codecov

.github/workflows/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
uses: Swatinem/rust-cache@v2
5858
with:
5959
key: doc-build
60+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
6061

6162
- name: Build the docs
6263
run: |

.github/workflows/generate.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
uses: Swatinem/rust-cache@v2
7373
with:
7474
key: cargo-generate-${{ matrix.name }}
75+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
7576

7677
- name: Install `cargo-generate`
7778
uses: taiki-e/install-action@v2

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
uses: Swatinem/rust-cache@v2
6363
with:
6464
key: publish-build
65+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
6566

6667
- name: Build examples
6768
run: cargo xtask run-wasm --no-serve

.github/workflows/shaders.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
EOF
3939
4040
- uses: Swatinem/rust-cache@v2
41+
with:
42+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
4143

4244
# We must have the FXC job before the DXC job, so the DXC PATH has priority
4345
# over the FXC PATH. This is because the windows kits also include an older
@@ -82,6 +84,8 @@ jobs:
8284
EOF
8385
8486
- uses: Swatinem/rust-cache@v2
87+
with:
88+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
8589

8690
- run: |
8791
cd naga
@@ -110,6 +114,8 @@ jobs:
110114
EOF
111115
112116
- uses: Swatinem/rust-cache@v2
117+
with:
118+
save-if: ${{ github.ref == 'refs/heads/trunk' }}
113119

114120
- run: cd naga; cargo xtask validate spv
115121

0 commit comments

Comments
 (0)