Skip to content

Commit b325cf9

Browse files
committed
[metal] Use objc2-metal
commit 0a1ce66 Author: Mads Marquart <[email protected]> Date: Fri Apr 25 22:01:53 2025 +0200 Use normal objc2 naming scheme commit 35a9525 Author: Mads Marquart <[email protected]> Date: Tue Apr 29 14:24:41 2025 +0200 Use `objc2-metal` with `metal` naming scheme To keep the diff smaller and easier to review, this uses a temporary fork of `objc2-metal` and `objc2-quartz-core` whose methods use the naming scheme of the `metal` crate. One particular difficult part with this is that the `metal` crate has several methods where the order of the arguments are swapped relative to the corresponding Objective-C methods. This includes most perilously (since these have both an offset and an index argument, both of which are integers): - `set_bytes` - `set_vertex_bytes` - `set_fragment_bytes` - `set_buffer` - `set_vertex_buffer` - `set_fragment_buffer` - `set_threadgroup_memory_length` But also: - `set_vertex_texture` - `set_fragment_texture` - `set_sampler_state` - `set_vertex_sampler_state` - `set_fragment_sampler_state` Another noteworthy thing to mention is that `objc2-metal` does not (yet) provide a fallback for MTLCopyAllDevices, so we have to do that ourselves: madsmtm/objc2@3543940 commit ab07462 Author: Mads Marquart <[email protected]> Date: Fri Apr 25 22:01:34 2025 +0200 [examples] Do not request redraw on resize This is no longer necessary, since Winit can now properly issue redraw events on resize. commit b99da84 Author: Mads Marquart <[email protected]> Date: Fri Apr 25 22:00:41 2025 +0200 [metal] Use raw-window-metal to do layer creation This removes the manual implementation introduced in 7b00140. commit d2f8c44 Author: Teodor Tanasoaia <[email protected]> Date: Fri Jul 18 19:04:46 2025 +0200 [wgpu-core] remove implicit PL & BGL IDs from pipeline creation (gfx-rs#7967) commit 4ef4f5d Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jul 10 22:24:39 2025 +0000 chore(deps): update dependency ubuntu to v24 commit cf4a74c Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jul 10 22:24:26 2025 +0000 chore(deps): update deps and deny file commit 232d465 Author: Connor Fitzgerald <[email protected]> Date: Thu Jul 17 21:12:30 2025 -0400 ci: only allow one set of jobs per PR (gfx-rs#7958) commit 5d14f33 Author: Andy Leiserson <[email protected]> Date: Thu Jul 17 15:52:51 2025 -0700 Test for use of staging buffer in writeTexture (gfx-rs#7963) commit 9a596fa Author: Andy Leiserson <[email protected]> Date: Thu Jul 17 13:08:06 2025 -0700 Fix warnings from the nightly Rust compiler (gfx-rs#7964) commit ff0de91 Author: Connor Fitzgerald <[email protected]> Date: Thu Jul 17 13:00:40 2025 -0400 Bump REPO_MSRV to 1.88 (gfx-rs#7960) commit 33b9f86 Author: Teodor Tanasoaia <[email protected]> Date: Thu Jul 17 18:47:59 2025 +0200 Fix detection of `local_invocation_id` for zero initialization of workgroup memory (gfx-rs#7962) commit 76dba55 Author: Erich Gubler <[email protected]> Date: Wed Jul 16 17:16:29 2025 -0400 style(vulkan): no trailing space after raytrace cap. negotiation (gfx-rs#7954) commit 49b773f Author: Connor Fitzgerald <[email protected]> Date: Fri Jul 11 00:48:44 2025 -0400 Add some documentation to wgpu-hal types commit 1ed6187 Author: Connor Fitzgerald <[email protected]> Date: Fri Jul 11 00:26:02 2025 -0400 Remove wgpu_core::hal_api::HalApi commit 0dbe5fb Author: Connor Fitzgerald <[email protected]> Date: Thu Jul 10 23:56:07 2025 -0400 Add annotations for the types hal types return commit 81b3e7c Author: Connor Fitzgerald <[email protected]> Date: Thu Jul 10 22:33:46 2025 -0400 Rearrange methods on Instance commit e5b10e0 Author: Connor Fitzgerald <[email protected]> Date: Thu Jul 10 22:14:36 2025 -0400 Adjust InstanceDescriptor docs commit f7b672f Author: Connor Fitzgerald <[email protected]> Date: Thu Jul 10 22:14:36 2025 -0400 Update release checklist commit f83af61 Author: Connor Fitzgerald <[email protected]> Date: Thu Jul 10 21:59:35 2025 -0400 Clarify `naga` psuedo-feature in wgpu commit 15f7c7e Author: Connor Fitzgerald <[email protected]> Date: Thu Jul 10 21:48:50 2025 -0400 Remove unneeded comment commit 13d0cd4 Author: Lucas Abel <[email protected]> Date: Wed Jul 16 18:49:03 2025 +0200 [core] fix invalid read in `Queue::write_texture` (gfx-rs#7893) commit 1da2177 Author: Andy Leiserson <[email protected]> Date: Tue Jul 15 10:06:11 2025 -0700 Add skip conditions to CTS runner (gfx-rs#7949) commit dd50e56 Author: SupaMaggie70Incorporated <[email protected]> Date: Mon Jul 14 21:51:31 2025 -0700 Update rspirv version (gfx-rs#7945) commit 4572e05 Author: Connor Fitzgerald <[email protected]> Date: Mon Jul 14 12:48:49 2025 -0400 ci: add coverage for cts (gfx-rs#7942) commit 9872df5 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Jul 14 02:50:23 2025 -0400 Update cts digest to 6e9d87b (gfx-rs#7941) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit c51fe57 Author: Jim Blandy <[email protected]> Date: Sat Jul 12 22:04:19 2025 -0700 Improve docs for `wgpu_types::InstanceFlags::VALIDATION`. (gfx-rs#7939) commit 1b4eca9 Author: Andy Leiserson <[email protected]> Date: Tue Mar 25 19:09:43 2025 -0700 [naga hlsl-out] Factor out some repetitive code commit bfa7ee8 Author: Andy Leiserson <[email protected]> Date: Sat Mar 22 13:01:11 2025 -0700 [naga hlsl-out] Handle additional cases of Cx2 matrices Fixes gfx-rs#4423 commit c868142 Author: Andy Leiserson <[email protected]> Date: Fri Jul 11 14:43:03 2025 -0700 Validate vertex and index buffer alignment (gfx-rs#7929) commit ae946db Author: Andy Leiserson <[email protected]> Date: Fri Jul 11 13:20:13 2025 -0700 Use backwards-compatible options to `git config` (gfx-rs#7934) commit 5b2c840 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Thu Jul 10 18:57:33 2025 -0400 chore(deps): update cts digest to 18fcd81 (gfx-rs#7923) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 085eaa6 Author: Connor Fitzgerald <[email protected]> Date: Thu Jul 10 18:42:49 2025 -0400 Forward port v26.0.1 changelog (gfx-rs#7921) commit 4844fa6 Author: Vecvec <[email protected]> Date: Fri Jul 11 07:53:32 2025 +1200 Merge acceleration structure feature and ray query feature. (gfx-rs#7913) Co-authored-by: Connor Fitzgerald <[email protected]> commit 166c2ea Author: Erich Gubler <[email protected]> Date: Thu Jul 10 15:04:37 2025 -0400 fix(core): check query set index before other validation (gfx-rs#7908) commit b83c9cf Author: Kevin Reid <[email protected]> Date: Thu Jul 10 10:06:36 2025 -0700 Fix `initialize_adapter_from_env` under no_std. Without this change, `desired_adapter_name` is an undeclared variable. commit c0a8ba6 Author: Kevin Reid <[email protected]> Date: Thu Jul 10 09:46:37 2025 -0700 [ci] Check with profiling enabled. Minimum version of `profiling` increases from ^1.0.0 to ^1.0.1 because the `type-check` feature was added in 1.0.1. commit da6ccd5 Author: Kevin Reid <[email protected]> Date: Thu Jul 10 09:39:06 2025 -0700 Fix undeclared `base` in profiling scopes. This would cause compilation to fail if profiling was enabled. commit dc924bc Author: Andy Leiserson <[email protected]> Date: Wed Jul 9 16:56:49 2025 -0700 Remove `unsafe` from `hal::BufferBinding::new_unchecked` commit 9b966bf Author: Andy Leiserson <[email protected]> Date: Wed Jul 9 09:56:57 2025 -0700 Fix for destroyed resource errors commit 468632f Author: Andy Leiserson <[email protected]> Date: Wed Jul 9 11:31:06 2025 -0700 Restore plumbing of implicit remainder-of-buffer size to backends commit 00406a7 Author: Andy Leiserson <[email protected]> Date: Wed Jul 9 13:55:37 2025 -0700 Fix calculation error commit 2db1d71 Author: Andy Leiserson <[email protected]> Date: Wed Jul 9 16:28:51 2025 -0700 [deno] Implement nullable vertex buffer layouts commit 27e7408 Author: Andy Leiserson <[email protected]> Date: Wed Jul 9 13:17:07 2025 -0700 Restore the buffer size changes
1 parent 4aac22e commit b325cf9

File tree

265 files changed

+4922
-3319
lines changed

Some content is hidden

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

265 files changed

+4922
-3319
lines changed

.deny.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ skip-tree = [
1313
{ name = "bit-set", version = "0.5.3" },
1414
{ name = "bit-vec", version = "0.6.3" },
1515
{ name = "capacity_builder", version = "0.1.3" },
16+
17+
# Winit 0.30 uses an older objc2
18+
{ name = "objc2-foundation", version = "0.2" },
1619
]
1720
skip = [
1821
# Flume uses an old version
@@ -29,7 +32,8 @@ skip = [
2932
{ name = "windows-result", version = "0.3.4" },
3033
{ name = "windows-strings", version = "0.4.2" },
3134

32-
# cargo-metadata uses an old version of ordered-float. Only used for testing.
35+
# cargo-metadata uses old version. Only used for infrastructure.
36+
{ name = "toml", version = "0.8.23" },
3337
{ name = "ordered-float", version = "2.10.1" },
3438
# criterion uses an old version
3539
{ name = "itertools", version = "0.10.5" },
@@ -41,6 +45,7 @@ skip = [
4145
# Strum uses an old version
4246
{ name = "heck", version = "0.4.0" },
4347
# Deno uses an old version
48+
{ name = "bincode", version = "1.3.3" },
4449
{ name = "strum", version = "0.25.0" },
4550
]
4651
wildcards = "deny"
@@ -70,7 +75,7 @@ private = { ignore = true }
7075

7176
[sources]
7277
allow-git = [
73-
# Waiting on releases; used in examples only
78+
# Waiting on releases; used in examples/tests only
7479
]
7580
unknown-registry = "deny"
7681
unknown-git = "deny"

.github/workflows/ci.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525
MESA_VERSION: "24.3.4"
2626

2727
# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
28-
REPO_MSRV: "1.84"
28+
REPO_MSRV: "1.88"
2929
# This is the MSRV used by the `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates,
3030
# to ensure that they can be used with firefox.
3131
CORE_MSRV: "1.82.0"
@@ -46,6 +46,13 @@ env:
4646
CACHE_SUFFIX: d # cache busting
4747
WGPU_CI: true
4848

49+
# Every time a PR is pushed to, cancel any previous jobs. This
50+
# makes us behave nicer to github and get faster turnaround times
51+
# on PRs that are pushed to multiple times in rapid succession.
52+
concurrency:
53+
group: ${{github.workflow}}-${{github.ref}}
54+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
55+
4956
# We distinguish the following kinds of builds:
5057
# - native: build for the same target as we compile on
5158
# - web: build for the Web
@@ -115,68 +122,68 @@ jobs:
115122

116123
# Linux
117124
- name: Linux x86_64
118-
os: ubuntu-22.04
125+
os: ubuntu-24.04
119126
target: x86_64-unknown-linux-gnu
120127
tier: 1
121128
kind: native
122129

123130
- name: Linux aarch64
124-
os: ubuntu-22.04
131+
os: ubuntu-24.04
125132
target: aarch64-unknown-linux-gnu
126133
tier: 1
127134
kind: native
128135

129136
# Android
130137
- name: Android aarch64
131-
os: ubuntu-22.04
138+
os: ubuntu-24.04
132139
target: aarch64-linux-android
133140
tier: 2
134141
kind: native
135142

136143
# Android
137144
- name: Android ARMv7
138-
os: ubuntu-22.04
145+
os: ubuntu-24.04
139146
target: armv7-linux-androideabi
140147
tier: 2
141148
kind: wgpu-only
142149

143150
# Android
144151
- name: Android x86_64
145-
os: ubuntu-22.04
152+
os: ubuntu-24.04
146153
target: x86_64-linux-android
147154
tier: 2
148155
kind: wgpu-only
149156

150157
# OpenHarmony
151158
- name: OpenHarmony aarch64
152-
os: ubuntu-22.04
159+
os: ubuntu-24.04
153160
target: aarch64-unknown-linux-ohos
154161
tier: 2
155162
kind: native
156163

157164
# WebGPU/WebGL
158165
- name: WebAssembly
159-
os: ubuntu-22.04
166+
os: ubuntu-24.04
160167
target: wasm32-unknown-unknown
161168
tier: 2
162169
kind: web
163170

164171
- name: Emscripten
165-
os: ubuntu-22.04
172+
os: ubuntu-24.04
166173
target: wasm32-unknown-emscripten
167174
tier: 2
168175
kind: wgpu-only
169176

170177
- name: WebAssembly Core 1.0
171-
os: ubuntu-22.04
178+
os: ubuntu-24.04
172179
target: wasm32v1-none
173180
tier: 2
174181
kind: no_std
175182

176183
# 32-bit PowerPC Linux
177184
# Included to test support for `portable-atomic`
178185
- name: Linux ppc32
179-
os: ubuntu-22.04
186+
os: ubuntu-24.04
180187
target: powerpc-unknown-linux-gnu
181188
tier: 2
182189
kind: wgpu-only
@@ -357,7 +364,7 @@ jobs:
357364

358365
# Linux
359366
- name: Linux x86_64
360-
os: ubuntu-22.04
367+
os: ubuntu-24.04
361368
target: x86_64-unknown-linux-gnu
362369

363370
name: MSRV Check ${{ matrix.name }}
@@ -412,7 +419,7 @@ jobs:
412419
timeout-minutes: 10
413420

414421
name: MSRV Minimal Versions
415-
runs-on: ubuntu-22.04
422+
runs-on: ubuntu-24.04
416423
env:
417424
# Override flags to NOT include `-D warnings`, because warnings may be due to harmless problems in deps.
418425
# Also, allow unexpected_cfgs because it is very common and spammy when using old deps.

.github/workflows/cts.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ env:
1111
CARGO_INCREMENTAL: false
1212
CARGO_TERM_COLOR: always
1313
RUST_BACKTRACE: full
14-
MSRV: "1.84"
14+
MSRV: "1.88"
15+
16+
# Every time a PR is pushed to, cancel any previous jobs. This
17+
# makes us behave nicer to github and get faster turnaround times
18+
# on PRs that are pushed to multiple times in rapid succession.
19+
concurrency:
20+
group: ${{github.workflow}}-${{github.ref}}
21+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
1522

1623
jobs:
1724
cts:
@@ -23,16 +30,19 @@ jobs:
2330
- name: Windows x86_64
2431
os: windows-2022
2532
target: x86_64-pc-windows-msvc
33+
backend: dx12
2634

2735
# Mac
2836
- name: Mac aarch64
2937
os: macos-14
3038
target: x86_64-apple-darwin
39+
backend: metal
3140

3241
# Linux
3342
- name: Linux x86_64
3443
os: ubuntu-24.04
3544
target: x86_64-unknown-linux-gnu
45+
backend: vulkan
3646

3747
name: CTS ${{ matrix.name }}
3848
runs-on: ${{ matrix.os }}
@@ -43,10 +53,15 @@ jobs:
4353

4454
- name: Install Repo MSRV toolchain
4555
run: |
46-
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --target ${{ matrix.target }}
56+
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --target ${{ matrix.target }} --component llvm-tools
4757
rustup override set ${{ env.MSRV }}
4858
cargo -V
4959
60+
- name: Install `cargo-llvm-cov`
61+
uses: taiki-e/install-action@v2
62+
with:
63+
tool: cargo-llvm-cov
64+
5065
- name: caching
5166
uses: Swatinem/rust-cache@v2
5267
with:
@@ -60,7 +75,7 @@ jobs:
6075
mkdir -p .cargo
6176
cat <<EOF >> .cargo/config.toml
6277
[profile.dev]
63-
debug = 1
78+
debug = "line-tables-only"
6479
EOF
6580
6681
- name: (Windows) Install DXC
@@ -71,12 +86,28 @@ jobs:
7186
if: matrix.os == 'windows-2022'
7287
uses: ./.github/actions/install-warp
7388
with:
74-
target-dirs: "target/debug"
89+
target-dirs: "target/llvm-cov-target/debug"
7590

7691
- name: (Linux) Install Mesa
7792
if: matrix.os == 'ubuntu-24.04'
7893
uses: ./.github/actions/install-mesa
7994

8095
- name: run CTS
8196
shell: bash
82-
run: cargo xtask cts
97+
run: cargo xtask cts --llvm-cov --backend ${{ matrix.backend }}
98+
99+
- name: Generate coverage report
100+
id: coverage
101+
shell: bash
102+
continue-on-error: true
103+
run: |
104+
set -e
105+
106+
cargo llvm-cov report --lcov --output-path lcov.info
107+
108+
- name: Upload coverage report to Codecov
109+
uses: codecov/codecov-action@v5
110+
if: steps.coverage.outcome == 'success'
111+
with:
112+
files: lcov.info
113+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/docs.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,19 @@ on:
1010

1111
env:
1212
# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
13-
REPO_MSRV: "1.84"
13+
REPO_MSRV: "1.88"
1414

1515
CARGO_INCREMENTAL: false
1616
CARGO_TERM_COLOR: always
1717
RUST_BACKTRACE: full
1818

19+
# Every time a PR is pushed to, cancel any previous jobs. This
20+
# makes us behave nicer to github and get faster turnaround times
21+
# on PRs that are pushed to multiple times in rapid succession.
22+
concurrency:
23+
group: ${{github.workflow}}-${{github.ref}}
24+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
25+
1926
jobs:
2027
build:
2128
runs-on: ubuntu-latest

.github/workflows/generate.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ env:
1313
#
1414

1515
# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
16-
REPO_MSRV: "1.84"
16+
REPO_MSRV: "1.88"
1717
RUSTFLAGS: -D warnings
1818

19+
# Every time a PR is pushed to, cancel any previous jobs. This
20+
# makes us behave nicer to github and get faster turnaround times
21+
# on PRs that are pushed to multiple times in rapid succession.
22+
concurrency:
23+
group: ${{github.workflow}}-${{github.ref}}
24+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
25+
1926
jobs:
2027
cargo-generate:
2128
timeout-minutes: 5

0 commit comments

Comments
 (0)