Commit Graph

1961 Commits

Author SHA1 Message Date
firestar99
67266701e2 ci: only save cache on main 2026-04-08 13:14:36 +02:00
firestar99
52571db8ed ci: make "test" prep deps cache for compiletests and difftests 2026-04-08 13:14:36 +02:00
firestar99
90a625b7ed ci: reuse rust-cache between different jobs on the same platform, remove cache from lint 2026-04-08 13:14:36 +02:00
firestar99
88f3b7ca77 ci: add rust-cache action after toolchain install 2026-04-08 13:14:36 +02:00
Christian Legnitto
ddb039b9c9 spirv-builder: fall back to hashed codegen dylibs
All checks were successful
Rust Toolchain Upgrade / check-and-upgrade (push) Has been skipped
spirv-builder only looks for the exact
librustc_codegen_spirv.{so,dylib,dll} filename in the dylib search path.

That works in the rust-gpu workspace, but it misses external build.rs
consumers where Cargo only exposes hashed deps artifacts such as
librustc_codegen_spirv-<hash>.so. This showed up in a downstream
workspace update to current rust-gpu main where the consumer path only
had hashed backend artifacts available to default SpirvBuilder
discovery.

Keep preferring the exact filename when present, then fall back to the
newest hashed rustc_codegen_spirv dylib in the same search paths. Add
tests for exact matches, hashed fallback, and exact-over-hashed
precedence.
2026-04-02 22:28:00 +00:00
LegNeato
be4c9b7257 Upgrade Rust toolchain to nightly-2026-04-02
Updates:
- rust-toolchain.toml: nightly-2026-04-02
- commit hash: 7e46c5f6fb87f8cf4353e058479cef15d1d952b4
- REQUIRED_RUST_TOOLCHAIN in build.rs
2026-04-02 06:17:53 +00:00
Christian Legnitto
bc735676c4 compiletests: bless expected output for nightly-2026-04-01
All checks were successful
Rust Toolchain Upgrade / check-and-upgrade (push) Has been skipped
2026-04-01 11:52:01 +00:00
Christian Legnitto
f012026b21 intrinsics: update renamed float intrinsic symbols
rustc renamed fabsf32/fabsf64/fabsf128 to a single unified `fabs`
symbol, and minnumf32/f64/f128 and maxnumf32/f64/f128 to
minimumf32/f64/f128 and maximumf32/f64/f128 respectively.
2026-04-01 11:52:01 +00:00
Christian Legnitto
f9bd67f014 Upgrade Rust toolchain to nightly-2026-04-01
Updates rust-toolchain.toml and REQUIRED_RUST_TOOLCHAIN in build.rs
to nightly-2026-04-01 (commit 48cc71ee88cd0f11217eced958b9930970da998b).
2026-04-01 11:52:01 +00:00
Christian Legnitto
877bd8697a compiletests: drop RuntimeArray const-bitcast misuse case
All checks were successful
Rust Toolchain Upgrade / check-and-upgrade (push) Has been skipped
Remove the compile-fail test that casts constant data to `*const RuntimeArray<T>`. We do not want to support constructing `RuntimeArray` from Rust constant data.
2026-03-30 07:03:29 +00:00
Christian Legnitto
b50c2dd3ef consts: stop reifying RuntimeArray constant data
Revert the `const_str` reshaping and the direct `RuntimeArray` constant-loading path in `read_from_const_alloc_at`. This restores the older behavior of treating `RuntimeArray` constants as unsupported instead of trying to materialize them from Rust constant data.
2026-03-30 07:03:29 +00:00
firestar99
51dc04842f spirv-builder: make required extra arg -Zjson-target-spec backwards compatible 2026-03-30 07:03:29 +00:00
firestar99
e7c77794d7 std: remove unused features rustc warns about 2026-03-30 07:03:29 +00:00
Christian Legnitto
2716cc9243 consts: remove dead runtime-array const bitcast fallback
The generic unsized constant reader already handles `RuntimeArray` constants, including the trailing-bytes error case covered by the new compile-fail test. Keep `const_bitcast` on the direct `try_read_from_const_alloc` path instead of carrying a second fallback that no longer changes behavior.
2026-03-30 07:03:29 +00:00
Christian Legnitto
32b43cb025 compiletests: cover invalid runtime-array const bitcasts
Add a UI compile-fail test for casting a 3-byte constant allocation to `*const RuntimeArray<u16>`. This exercises the existing trailing-bytes diagnostic for unsupported unsized constants and guards the review concern that this shape must fail instead of silently lowering.
2026-03-30 07:03:29 +00:00
Christian Legnitto
bdf8bae42c Remove duplicate PassMode::Direct check
This is handled above.
2026-03-30 07:03:29 +00:00
Christian Legnitto
7e6d5fc0e7 compiletests: normalize issue-1062 OpLine output
This disassembly test only cares about the rotate lowering pattern, not source
line tables. Strip OpLine records entirely so line-number drift across toolchains
does not require reblessing the test.
2026-03-30 07:03:29 +00:00
Christian Legnitto
6d7b046c56 consts: diagnose invalid runtime-array const bitcasts
Keep the existing runtime-array reification path for const pointer bitcasts,
but report a specific zombie reason when the backing allocation size is not a
multiple of the runtime-array element size instead of silently falling through
to the generic const_bitcast error.
2026-03-30 07:03:29 +00:00
Christian Legnitto
32fca6dd58 codegen: update attr handling for rustc 1d8897a4e
Use exact rust_gpu attribute paths with get_attrs_by_path, let
AggregatedSpirvAttributes parse filtered iterators directly, and replace the
manual debug filename arena allocation with DroplessArena::alloc_str.

Also port the rustc-private API drift in this nightly by importing
assert_matches from std, using rustc_span::Spanned directly, and renaming
BackendRepr::ScalableVector to SimdScalableVector.
2026-03-30 07:03:29 +00:00
Christian Legnitto
2db3866832 build: sync crate attrs with nightly-2026-03-14
Update the pinned workspace toolchain to rustc 1.96.0-nightly
(1d8897a4e 2026-03-13) and keep REQUIRED_RUST_TOOLCHAIN in sync.

Mirror the current rustc_codegen_ssa crate-attribute header in lib.rs,
keep rustc_codegen_spirv-specific lint allowances outside that mirrored block,
and drop the now-unneeded bootstrap-only header filtering from build.rs.
2026-03-30 07:03:29 +00:00
Christian Legnitto
09434d5c49 style: run cargo fmt --all 2026-03-30 07:03:29 +00:00
Christian Legnitto
59908c43b8 compiletests: update ptr_copy stderr for extra pointer-cast diagnostic 2026-03-30 07:03:29 +00:00
Christian Legnitto
ed92bf9f76 codegen: match likely/unlikely via intrinsic symbols 2026-03-30 07:03:29 +00:00
Christian Legnitto
54ae6de4b5 codegen: fix panic entry-point classification and arg decoding 2026-03-30 07:03:29 +00:00
Christian Legnitto
46a0c362ed codegen: align funclet stubs and likely handling notes 2026-03-30 07:03:29 +00:00
Christian Legnitto
f94e838d80 codegen: emit typed local panic spills without typed_alloca 2026-03-30 07:03:29 +00:00
Christian Legnitto
250b41df6d codegen: use size-based alloca for panic arg spill 2026-03-30 07:03:29 +00:00
Christian Legnitto
ec0a345909 fix lint and spv1.3 stderr for panic/message updates 2026-03-30 07:03:29 +00:00
Christian Legnitto
863144fed9 compiletests: normalize relative spirv-std paths in stderr 2026-03-30 07:03:29 +00:00
Christian Legnitto
8ed1921f9b codegen: decode panic_bounds_check debug-printf args 2026-03-30 07:03:29 +00:00
Christian Legnitto
3eeb8136a5 codegen: preserve panic_const messages in panic fast path 2026-03-30 07:03:29 +00:00
Christian Legnitto
20c005af97 codegen: harden panic message decoding for nightly call shapes 2026-03-30 07:03:29 +00:00
Christian Legnitto
40e3fb9673 codegen: preserve raw fn ABI query invariants 2026-03-30 07:03:29 +00:00
Christian Legnitto
9763586fed codegen: harden panic format_args fallback for split/pass-through shapes 2026-03-30 07:03:29 +00:00
Christian Legnitto
dfbad8c64e codegen: stop treating core precondition_check as panic entry point 2026-03-30 07:03:29 +00:00
Christian Legnitto
c862ecbf51 codegen: adapt panic format_args decompiler for new nightly shapes 2026-03-30 07:03:29 +00:00
Christian Legnitto
ea73923fcb compiletests: bless sampled image query_size_lod stderr 2026-03-30 07:03:29 +00:00
Christian Legnitto
309e80942a spirv-builder: pass -Zjson-target-spec for JSON targets 2026-03-30 07:03:29 +00:00
Christian Legnitto
91fa3f579c Rustfmt codegen_cx panic-entry matcher formatting 2026-03-30 07:03:29 +00:00
Christian Legnitto
00f2a511f6 Bless compiletest stderr for updated nightly diagnostics 2026-03-30 07:03:29 +00:00
Christian Legnitto
3d2cd4ed3d Fix panic-entry matching and disable-pqp unused-features lint 2026-03-30 07:03:29 +00:00
Christian Legnitto
0f0810b68d Gate bounds/precondition panic-entry detection to non-local core symbols 2026-03-30 07:03:29 +00:00
Christian Legnitto
09dbdff995 Replace fmt::Arguments sentinel metadata with typed constructor tags 2026-03-30 07:03:29 +00:00
Christian Legnitto
3d357945f1 Guard runtime-array const reification against truncation and ZST tails 2026-03-30 07:03:29 +00:00
Christian Legnitto
adb7e0be7b Resolve new collapsible-match clippy lints in example runners 2026-03-30 07:03:29 +00:00
Christian Legnitto
18f3c3fa85 Port linker test harness to current rustc session APIs 2026-03-30 07:03:29 +00:00
Christian Legnitto
de6c4c19c9 Fix new nightly clippy suggestions in type trie and linker 2026-03-30 07:03:29 +00:00
Christian Legnitto
4f88b0f228 Handle nightly panic format_args lowering and unsized const reification 2026-03-30 07:03:29 +00:00
Christian Legnitto
93623558af Handle newer panic format_args lowering patterns 2026-03-30 07:03:29 +00:00
Christian Legnitto
2964d6742a Port backend internals and ABI plumbing to latest nightly 2026-03-30 07:03:29 +00:00