Skip to content

render: wgpu 26 to 30, which is what drops the unmaintained block - #90

Merged
Orellius merged 1 commit into
mainfrom
wgpu-30
Aug 26, 2026
Merged

render: wgpu 26 to 30, which is what drops the unmaintained block#90
Orellius merged 1 commit into
mainfrom
wgpu-30

Conversation

@Orellius

Copy link
Copy Markdown
Owner

The last warning any build printed:

warning: the following packages contain code that will be rejected by a future version of Rust: block v0.1.6
> warning: static of uninhabited type
>   --> block-0.1.6/src/lib.rs:64:5

block is unmaintained and transitive: wgpu 26.0.1 -> wgpu-hal -> metal 0.32.0 -> block 0.1.6. Measured across four versions by resolving each in a scratch project: 27 and 28 still carry it, 29 is where metal and block leave the tree. So the fix is a bump, and the bump is an API migration.

Every change preserves behaviour

wgpu 26 wgpu 30 why this is not a behaviour change
bind_group_layouts: &[&L] &[Some(&L)] same layout, new optionality
push_constant_ranges: &[] immediate_size: 0 zero keeps Features::IMMEDIATES off, never requested
multiview: None on the pipeline multiview_mask: None on pipeline and pass single-view either way
(absent) color_space: Auto Auto is wgpu 30's name for what every earlier version did without asking
PollType::Wait PollType::wait_indefinitely() struct variant now; same meaning
get_mapped_range() -> BufferView -> Result<BufferView, _> the readback reports the failure instead of indexing a Result
frame.present() queue.present(frame) moved, not changed

The one that needed a decision

get_current_texture went from Result<SurfaceTexture, SurfaceError> to a seven-variant enum. The mapping is 26's behaviour variant for variant:

variant 26 did 30 does here
Success / Suboptimal Ok (26 set a suboptimal flag this renderer never read) draw
Lost / Outdated reconfigure, skip one frame same
Timeout PresentError::Acquire same, deliberately not promoted to a skip inside a version bump
Validation Other -> PresentError::Acquire same
Occluded had no name; would have landed in the error arm skip the frame

Occluded is the only new behaviour, and it is new information rather than a change of mind: reporting RenderFailed because the window is minimised is a false failure.

The eleven acquire lines were duplicated across present and present_all. They are one acquire method now -- a swapchain rule that holds on one path and not the other is the divergence shape this repo has already paid for four times (launch::dress, launch::seat).

Gates

gate result
cargo test --workspace 822 passed, 0 failed
cargo run -p termisu-vt-difftest 223/223 met expectation, "Harness verdict: WORKING"
./scripts/build-lib.sh exports 28/28 verified
./scripts/build-host.sh all 61 exports, and no warning line at all now
./scripts/build-swift.sh 15 smokes, rc=0

The gate that matters most for a GPU bump, run explicitly:

test the_gpu_backend_matches_the_cpu_reference_byte_for_byte ... ok
test the_gpu_lands_on_the_same_bytes ... ok

cargo build --workspace --release now prints zero warnings and zero notes.

Live tap

The compute and blit paths are byte-gated, but get_current_texture / queue.present only run against a real swapchain. Launched the freshly built host with a ZDOTDIR that prints a test line, captured with screencapture -l, no synthetic input:

  • truecolor 38;2;217;119;87 renders as D97757
  • Hebrew reorders right-to-left and 42 does not flip
  • box drawing, emoji as monochrome glyphs, the 256-colour ramp, the prompt

Screenshot attached in the merge comment.

Lock movement

248 crates, from 241. Out: block, metal, objc, malloc_buf, paste, hexf-parse, and the gpu-alloc, gpu-descriptor, foreign-types and core-foundation families. In: the objc2 families, raw-window-metal, naga-types, wgpu-naga-bridge, and the usual non-macOS platform crates that resolve but never compile here. no_network.rs passes against the new graph.

Observed once, not caused by this change

the_visible_grid_reads_back_as_text (crates/host/tests/session.rs:144) failed once on the first full run, then passed in isolation and passed two subsequent full --release runs. It waits on a fixed 5s budget for a real pty, which is the same shape as the two flakes already recorded in CLAUDE.md under "Tests measure their own claim, not the machine". Not touched here; flagged for its own fix.

The last warning any build printed was `block v0.1.6` declaring a static of an
uninhabited type, which becomes a hard error in a future rustc. It is not ours:
it arrived through `metal 0.32` under `wgpu-hal`. Measured across four versions,
wgpu 29 is where `metal` and `block` leave the tree, so the fix was a bump and
the bump was an API migration.

Every change below preserves behaviour rather than adopting a new one.

- `bind_group_layouts` takes `Option<&BindGroupLayout>` now.
- `push_constant_ranges: &[]` became `immediate_size: 0`. Zero keeps
  `Features::IMMEDIATES` off, which neither pipeline has ever asked for.
- `multiview: None` moved from the pipeline to `multiview_mask: None` on both
  the pipeline and the pass. Same single-view default.
- `SurfaceConfiguration` gained `color_space`. `Auto` is wgpu 30's name for what
  every earlier version did without asking, so the bytes this renderer encodes
  are read the same way.
- `PollType::Wait` is a struct variant; `wait_indefinitely()` is the old meaning.
- `get_mapped_range` returns a `Result`, so the readback reports the failure
  instead of indexing a `Result`.
- `frame.present()` moved to `queue.present(frame)`.

`get_current_texture` is the one that needed a decision rather than a rename. It
returns a seven-variant enum instead of `Result<_, SurfaceError>`. The mapping is
26's behaviour variant for variant, EXCEPT `Occluded`, which is new information:
26 had no name for it and would have folded it into the error arm, and reporting
RenderFailed because the window is minimised is a false failure. `Timeout` stays
an error, exactly as it was, rather than being promoted to a skip inside a bump.

The eleven acquire lines were duplicated across `present` and `present_all`. They
are one `acquire` method now, because a swapchain rule that holds on one path and
not the other is the divergence shape this project has already paid for four times.

`cargo build --workspace --release` prints zero warnings and zero notes. The lock
loses 16 crates and gains 23, at 248: `metal`, `block`, `objc` and the `gpu-alloc`
and `foreign-types` families out, the `objc2` families in.
@Orellius
Orellius merged commit 2461ff5 into main Aug 26, 2026
0 of 3 checks passed
@Orellius
Orellius deleted the wgpu-30 branch August 26, 2026 06:18
Orellius added a commit that referenced this pull request Aug 26, 2026
)

The last warning any build printed was `block v0.1.6` declaring a static of an
uninhabited type, which becomes a hard error in a future rustc. It is not ours:
it arrived through `metal 0.32` under `wgpu-hal`. Measured across four versions,
wgpu 29 is where `metal` and `block` leave the tree, so the fix was a bump and
the bump was an API migration.

Every change below preserves behaviour rather than adopting a new one.

- `bind_group_layouts` takes `Option<&BindGroupLayout>` now.
- `push_constant_ranges: &[]` became `immediate_size: 0`. Zero keeps
  `Features::IMMEDIATES` off, which neither pipeline has ever asked for.
- `multiview: None` moved from the pipeline to `multiview_mask: None` on both
  the pipeline and the pass. Same single-view default.
- `SurfaceConfiguration` gained `color_space`. `Auto` is wgpu 30's name for what
  every earlier version did without asking, so the bytes this renderer encodes
  are read the same way.
- `PollType::Wait` is a struct variant; `wait_indefinitely()` is the old meaning.
- `get_mapped_range` returns a `Result`, so the readback reports the failure
  instead of indexing a `Result`.
- `frame.present()` moved to `queue.present(frame)`.

`get_current_texture` is the one that needed a decision rather than a rename. It
returns a seven-variant enum instead of `Result<_, SurfaceError>`. The mapping is
26's behaviour variant for variant, EXCEPT `Occluded`, which is new information:
26 had no name for it and would have folded it into the error arm, and reporting
RenderFailed because the window is minimised is a false failure. `Timeout` stays
an error, exactly as it was, rather than being promoted to a skip inside a bump.

The eleven acquire lines were duplicated across `present` and `present_all`. They
are one `acquire` method now, because a swapchain rule that holds on one path and
not the other is the divergence shape this project has already paid for four times.

`cargo build --workspace --release` prints zero warnings and zero notes. The lock
loses 16 crates and gains 23, at 248: `metal`, `block`, `objc` and the `gpu-alloc`
and `foreign-types` families out, the `objc2` families in.
Orellius added a commit that referenced this pull request Aug 26, 2026
)

The last warning any build printed was `block v0.1.6` declaring a static of an
uninhabited type, which becomes a hard error in a future rustc. It is not ours:
it arrived through `metal 0.32` under `wgpu-hal`. Measured across four versions,
wgpu 29 is where `metal` and `block` leave the tree, so the fix was a bump and
the bump was an API migration.

Every change below preserves behaviour rather than adopting a new one.

- `bind_group_layouts` takes `Option<&BindGroupLayout>` now.
- `push_constant_ranges: &[]` became `immediate_size: 0`. Zero keeps
  `Features::IMMEDIATES` off, which neither pipeline has ever asked for.
- `multiview: None` moved from the pipeline to `multiview_mask: None` on both
  the pipeline and the pass. Same single-view default.
- `SurfaceConfiguration` gained `color_space`. `Auto` is wgpu 30's name for what
  every earlier version did without asking, so the bytes this renderer encodes
  are read the same way.
- `PollType::Wait` is a struct variant; `wait_indefinitely()` is the old meaning.
- `get_mapped_range` returns a `Result`, so the readback reports the failure
  instead of indexing a `Result`.
- `frame.present()` moved to `queue.present(frame)`.

`get_current_texture` is the one that needed a decision rather than a rename. It
returns a seven-variant enum instead of `Result<_, SurfaceError>`. The mapping is
26's behaviour variant for variant, EXCEPT `Occluded`, which is new information:
26 had no name for it and would have folded it into the error arm, and reporting
RenderFailed because the window is minimised is a false failure. `Timeout` stays
an error, exactly as it was, rather than being promoted to a skip inside a bump.

The eleven acquire lines were duplicated across `present` and `present_all`. They
are one `acquire` method now, because a swapchain rule that holds on one path and
not the other is the divergence shape this project has already paid for four times.

`cargo build --workspace --release` prints zero warnings and zero notes. The lock
loses 16 crates and gains 23, at 248: `metal`, `block`, `objc` and the `gpu-alloc`
and `foreign-types` families out, the `objc2` families in.
Orellius added a commit that referenced this pull request Aug 26, 2026
)

The last warning any build printed was `block v0.1.6` declaring a static of an
uninhabited type, which becomes a hard error in a future rustc. It is not ours:
it arrived through `metal 0.32` under `wgpu-hal`. Measured across four versions,
wgpu 29 is where `metal` and `block` leave the tree, so the fix was a bump and
the bump was an API migration.

Every change below preserves behaviour rather than adopting a new one.

- `bind_group_layouts` takes `Option<&BindGroupLayout>` now.
- `push_constant_ranges: &[]` became `immediate_size: 0`. Zero keeps
  `Features::IMMEDIATES` off, which neither pipeline has ever asked for.
- `multiview: None` moved from the pipeline to `multiview_mask: None` on both
  the pipeline and the pass. Same single-view default.
- `SurfaceConfiguration` gained `color_space`. `Auto` is wgpu 30's name for what
  every earlier version did without asking, so the bytes this renderer encodes
  are read the same way.
- `PollType::Wait` is a struct variant; `wait_indefinitely()` is the old meaning.
- `get_mapped_range` returns a `Result`, so the readback reports the failure
  instead of indexing a `Result`.
- `frame.present()` moved to `queue.present(frame)`.

`get_current_texture` is the one that needed a decision rather than a rename. It
returns a seven-variant enum instead of `Result<_, SurfaceError>`. The mapping is
26's behaviour variant for variant, EXCEPT `Occluded`, which is new information:
26 had no name for it and would have folded it into the error arm, and reporting
RenderFailed because the window is minimised is a false failure. `Timeout` stays
an error, exactly as it was, rather than being promoted to a skip inside a bump.

The eleven acquire lines were duplicated across `present` and `present_all`. They
are one `acquire` method now, because a swapchain rule that holds on one path and
not the other is the divergence shape this project has already paid for four times.

`cargo build --workspace --release` prints zero warnings and zero notes. The lock
loses 16 crates and gains 23, at 248: `metal`, `block`, `objc` and the `gpu-alloc`
and `foreign-types` families out, the `objc2` families in.
Orellius added a commit that referenced this pull request Aug 26, 2026
)

The last warning any build printed was `block v0.1.6` declaring a static of an
uninhabited type, which becomes a hard error in a future rustc. It is not ours:
it arrived through `metal 0.32` under `wgpu-hal`. Measured across four versions,
wgpu 29 is where `metal` and `block` leave the tree, so the fix was a bump and
the bump was an API migration.

Every change below preserves behaviour rather than adopting a new one.

- `bind_group_layouts` takes `Option<&BindGroupLayout>` now.
- `push_constant_ranges: &[]` became `immediate_size: 0`. Zero keeps
  `Features::IMMEDIATES` off, which neither pipeline has ever asked for.
- `multiview: None` moved from the pipeline to `multiview_mask: None` on both
  the pipeline and the pass. Same single-view default.
- `SurfaceConfiguration` gained `color_space`. `Auto` is wgpu 30's name for what
  every earlier version did without asking, so the bytes this renderer encodes
  are read the same way.
- `PollType::Wait` is a struct variant; `wait_indefinitely()` is the old meaning.
- `get_mapped_range` returns a `Result`, so the readback reports the failure
  instead of indexing a `Result`.
- `frame.present()` moved to `queue.present(frame)`.

`get_current_texture` is the one that needed a decision rather than a rename. It
returns a seven-variant enum instead of `Result<_, SurfaceError>`. The mapping is
26's behaviour variant for variant, EXCEPT `Occluded`, which is new information:
26 had no name for it and would have folded it into the error arm, and reporting
RenderFailed because the window is minimised is a false failure. `Timeout` stays
an error, exactly as it was, rather than being promoted to a skip inside a bump.

The eleven acquire lines were duplicated across `present` and `present_all`. They
are one `acquire` method now, because a swapchain rule that holds on one path and
not the other is the divergence shape this project has already paid for four times.

`cargo build --workspace --release` prints zero warnings and zero notes. The lock
loses 16 crates and gains 23, at 248: `metal`, `block`, `objc` and the `gpu-alloc`
and `foreign-types` families out, the `objc2` families in.
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