Skip to content

Conversation

nnethercote
Copy link
Contributor

  • We now get warnings about unnecessary parentheses around dyn types.
  • Spelling of sf.name.prefer_remapped_unconditionaly was fixed (now ends in lly).
  • Pointer::into_parts has been replaced with Pointer::prov_and_relative_offset.

@nnethercote
Copy link
Contributor Author

nnethercote commented Sep 30, 2025

Currently getting failures like this:

 thread 'rustc' panicked at /home/runner/work/rust-gpu/rust-gpu/target/release/build/rustc_codegen_spirv-7aed03f54af259ed/out/pqp_cg_ssa/src/mir/operand.rs:355:13:
assertion `left == right` failed
  left: Size(4 bytes)
 right: Size(16 bytes)

I will bisect locally to work out what's happening.

EDIT: I am no longer getting this error since #380 merged. It's now a different error, see below.

@nnethercote
Copy link
Contributor Author

Nightly 2025-07-05 is the last good one; Nightly 2025-07-06 is the first bad one.

The rust-lang/rust/ commit range between those two is e3843659e9f65f589d184d1221ac6149d5fa07b5..5adb489a8034f7b56b29f3b28af0813c866f679c.

I don't know if it's possible to bisect more finely than that because I don't know how to build rust-gpu with a locally built compiler. Having said that, the likely PR causing the problem is one of:

Because they are the only two PRs in the range that modify rustc_codegen_ssa, which is likely to affect rust-gpu.

I suspect it's the former (143410) because that's about SIMD and the failing assertion has this comment:

            // codegen_transmute_operand doesn't support SIMD, but since the previous
            // check handled ZSTs, the only possible field access into something SIMD
            // is to the `non_1zst_field` that's the same SIMD. (Other things, even
            // just padding, would change the wrapper's representation type.)
            assert_eq!(field.size, self.layout.size);

i.e. it's some kind of SIMD padding issue.

I'm out of my depth here, particularly on the rust-gpu side but even on the rustc side. @eddyb, do you know how to fix this?

@nazar-pc
Copy link
Contributor

nazar-pc commented Oct 2, 2025

#380 replaces #[repr(simd)] with #[rust_gpu::vector::v1]. Does it help with this PR?

@nnethercote
Copy link
Contributor Author

nnethercote commented Oct 2, 2025

I did a whole lot of follow-up on this today. The problem identified above turned out to be a rustc bug and the change was later reverted, but then there were other problems with later nightlys as well and it got very complicated. But in short, yes, landing #380 will probably help.

@nazar-pc
Copy link
Contributor

#380 is in 🎉

@nnethercote
Copy link
Contributor Author

nnethercote commented Oct 20, 2025

I have updated, now trying to update to 2025-08-04, but I have cargo compiletest failures:

failures:
    [ui] ui/arch/atomic_i_increment.rs
    [ui] ui/arch/index_unchecked.rs
    [ui] ui/lang/core/unwrap_or.rs
    [ui] ui/storage_class/runtime_descriptor_array.rs
    [ui] ui/storage_class/typed-buffer-simple.rs
    [ui] ui/storage_class/typed-buffer-unbound-struct.rs
    [ui] ui/storage_class/typed-buffer-unbound.rs
    [ui] ui/storage_class/typed_buffer.rs
    [ui] ui/storage_class/typed_buffer_descriptor_array.rs
    [ui] ui/storage_class/typed_buffer_descriptor_array_slice.rs
    [ui] ui/storage_class/typed_buffer_slice.rs

Lots of errors like this:

error: cannot cast between pointer types
       from `*void`
         to `*[u32]`
   --> /home/njn/.rustup/toolchains/nightly-2025-08-04-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/maybe_uninit.rs:332:6

- We now get warnings about unnecessary parentheses around `dyn` types.
- Spelling of `sf.name.prefer_remapped_unconditionaly` was fixed (now
  ends in `lly`).
- `Pointer::into_parts` has been replaced with
  `Pointer::prov_and_relative_offset`.
- `BuilderMethods::dynamic_alloca` was removed.
- `TargetDataLayout::pointer_{size,align}` were changed from fields to
  methods.
- `AddressSpace::DATA` was renamed `AddressSpace::ZERO`.
- `run_fat_lto`, `optimize_fat`, and `autodiff` were merged into
  `run_and_optimize_fat_lto`, and the parameters were changed.
- `run_thin_lto` parameters were changed.
- `codegen` parameters were changed.
- `LtoModuleCodegen` was removed.
- Minor error message changes:
  - Some line number changes in rustc.
  - Some error message wording tweaks.

The LTO changes occurred in rust-lang/rust PR 143388 and PR 144062.
- `tcx.get_attrs_unchecked(...)` was replaced with
  `tcx.get_all_attrs(...)`.
- `run_link` has been removed.
- `BuilderMethods::tail_call` was added. It's currently `todo!()`.
- Adjust expected test outputs for very minor error message formatting
  changes.
- And update to glam 0.30.8.
@nnethercote
Copy link
Contributor Author

@eddyb: to summarize here:

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.

2 participants