Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ rustflags = [
"-Wclippy::dbg_macro",
"-Wclippy::debug_assert_with_mut_call",
"-Wclippy::doc_markdown",
"-Wclippy::empty_enum",
"-Wclippy::empty_enums",
"-Wclippy::enum_glob_use",
"-Wclippy::exit",
"-Wclippy::expl_impl_clone_on_copy",
Expand Down
4 changes: 2 additions & 2 deletions crates/rustc_codegen_spirv/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ use std::{env, fs, mem};
/// `cargo publish`. We need to figure out a way to do this properly, but let's hardcode it for now :/
//const REQUIRED_RUST_TOOLCHAIN: &str = include_str!("../../rust-toolchain.toml");
const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain]
channel = "nightly-2025-10-28"
channel = "nightly-2025-11-02"
components = ["rust-src", "rustc-dev", "llvm-tools"]
# commit_hash = adaa838976ff99a4f0661136322f64cb466b58a0"#;
# commit_hash = bd3ac0330018c23b111bbee176f32c377be7b319"#;

fn rustc_output(arg: &str) -> Result<String, Box<dyn Error>> {
let rustc = env::var("RUSTC").unwrap_or_else(|_| "rustc".into());
Expand Down
2 changes: 1 addition & 1 deletion crates/spirv-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
clippy::dbg_macro,
clippy::debug_assert_with_mut_call,
clippy::doc_markdown,
clippy::empty_enum,
clippy::empty_enums,
clippy::enum_glob_use,
clippy::exit,
clippy::expl_impl_clone_on_copy,
Expand Down
2 changes: 1 addition & 1 deletion crates/spirv-std/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
clippy::dbg_macro,
clippy::debug_assert_with_mut_call,
clippy::doc_markdown,
clippy::empty_enum,
clippy::empty_enums,
clippy::enum_glob_use,
clippy::exit,
clippy::expl_impl_clone_on_copy,
Expand Down
2 changes: 1 addition & 1 deletion crates/spirv-std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
clippy::dbg_macro,
clippy::debug_assert_with_mut_call,
clippy::doc_markdown,
clippy::empty_enum,
clippy::empty_enums,
clippy::enum_glob_use,
clippy::exit,
clippy::expl_impl_clone_on_copy,
Expand Down
2 changes: 1 addition & 1 deletion examples/runners/ash/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
clippy::dbg_macro,
clippy::debug_assert_with_mut_call,
clippy::doc_markdown,
clippy::empty_enum,
clippy::empty_enums,
clippy::enum_glob_use,
clippy::exit,
clippy::expl_impl_clone_on_copy,
Expand Down
2 changes: 1 addition & 1 deletion examples/runners/cpu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
clippy::dbg_macro,
clippy::debug_assert_with_mut_call,
clippy::doc_markdown,
clippy::empty_enum,
clippy::empty_enums,
clippy::enum_glob_use,
clippy::exit,
clippy::expl_impl_clone_on_copy,
Expand Down
2 changes: 1 addition & 1 deletion examples/runners/wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
clippy::dbg_macro,
clippy::debug_assert_with_mut_call,
clippy::doc_markdown,
clippy::empty_enum,
clippy::empty_enums,
clippy::enum_glob_use,
clippy::exit,
clippy::expl_impl_clone_on_copy,
Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[toolchain]
channel = "nightly-2025-10-28"
channel = "nightly-2025-11-02"
components = ["rust-src", "rustc-dev", "llvm-tools"]
# commit_hash = adaa838976ff99a4f0661136322f64cb466b58a0
# commit_hash = bd3ac0330018c23b111bbee176f32c377be7b319

# Whenever changing the nightly channel, update the commit hash above, and
# change `REQUIRED_RUST_TOOLCHAIN` in `crates/rustc_codegen_spirv/build.rs` too.
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,17 @@ error[E0277]: the trait bound `WrongFrom: From<i32>` is not satisfied
LL | #[derive(Copy, Clone, Default, ScalarComposite)]
| ^^^^^^^^^^^^^^^ unsatisfied trait bound
|
= help: the trait `From<i32>` is not implemented for `WrongFrom`
but trait `From<u32>` is implemented for it
help: the trait `From<i32>` is not implemented for `WrongFrom`
but trait `From<u32>` is implemented for it
--> $DIR/subgroup_composite_enum_err.rs:
|
LL | impl From<$repr> for $ident {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | enum_repr_from!(WrongFrom, u32);
| ------------------------------- in this macro invocation
= help: for that trait implementation, expected `u32`, found `i32`
= note: this error originates in the derive macro `ScalarComposite` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in the derive macro `ScalarComposite` which comes from the expansion of the macro `enum_repr_from` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `i32: From<WrongFrom>` is not satisfied
--> $DIR/subgroup_composite_enum_err.rs:
Expand Down
66 changes: 58 additions & 8 deletions tests/compiletests/ui/image/gather_err.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,35 @@ error[E0277]: the trait bound `Image<f32, 0, 2, 0, 0, 1, 0, 4>: HasGather` is no
LL | let r1: glam::Vec4 = image1d.gather(*sampler, 0.0f32, 0);
| ^^^^^^ the trait `HasGather` is not implemented for `Image<f32, 0, 2, 0, 0, 1, 0, 4>`
|
= help: the following other types implement trait `HasGather`:
Image<SampledType, 1, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 3, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 4, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
help: the following other types implement trait `HasGather`
--> $SPIRV_STD_SRC/image.rs:1652:1
|
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 1, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 4, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 3, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, spirv_std::::image::{impl#1}::{constant#0}, SAMPLED, FORMAT, COMPONENTS>::gather`
--> $SPIRV_STD_SRC/image.rs:200:15
|
Expand All @@ -23,10 +48,35 @@ error[E0277]: the trait bound `Image<f32, 2, 2, 0, 0, 1, 0, 4>: HasGather` is no
LL | let r2: glam::Vec4 = image3d.gather(*sampler, v3, 0);
| ^^^^^^ the trait `HasGather` is not implemented for `Image<f32, 2, 2, 0, 0, 1, 0, 4>`
|
= help: the following other types implement trait `HasGather`:
Image<SampledType, 1, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 3, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 4, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
help: the following other types implement trait `HasGather`
--> $SPIRV_STD_SRC/image.rs:1652:1
|
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 1, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 4, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 3, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, spirv_std::::image::{impl#1}::{constant#0}, SAMPLED, FORMAT, COMPONENTS>::gather`
--> $SPIRV_STD_SRC/image.rs:200:15
|
Expand Down
43 changes: 38 additions & 5 deletions tests/compiletests/ui/image/query/query_levels_err.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,44 @@ error[E0277]: the trait bound `Image<f32, 4, 2, 0, 0, 1, 0, 4>: HasQueryLevels`
LL | *output = image.query_levels();
| ^^^^^^^^^^^^ the trait `HasQueryLevels` is not implemented for `Image<f32, 4, 2, 0, 0, 1, 0, 4>`
|
= help: the following other types implement trait `HasQueryLevels`:
Image<SampledType, 0, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 1, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 2, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 3, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>
help: the following other types implement trait `HasQueryLevels`
--> $SPIRV_STD_SRC/image.rs:1718:1
|
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 0, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 1, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 2, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 3, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>`
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>::query_levels`
--> $SPIRV_STD_SRC/image.rs:971:15
|
Expand Down
43 changes: 38 additions & 5 deletions tests/compiletests/ui/image/query/query_lod_err.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,44 @@ error[E0277]: the trait bound `Image<f32, 4, 2, 0, 0, 1, 0, 4>: HasQueryLevels`
LL | *output = image.query_lod(*sampler, glam::Vec2::new(0.0, 1.0));
| ^^^^^^^^^ the trait `HasQueryLevels` is not implemented for `Image<f32, 4, 2, 0, 0, 1, 0, 4>`
|
= help: the following other types implement trait `HasQueryLevels`:
Image<SampledType, 0, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 1, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 2, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 3, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>
help: the following other types implement trait `HasQueryLevels`
--> $SPIRV_STD_SRC/image.rs:1718:1
|
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 0, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 1, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 2, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 3, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>`
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, MULTISAMPLED, SAMPLED, FORMAT, COMPONENTS>::query_lod`
--> $SPIRV_STD_SRC/image.rs:1001:15
|
Expand Down
43 changes: 38 additions & 5 deletions tests/compiletests/ui/image/query/query_size_lod_err.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,44 @@ error[E0277]: the trait bound `Image<f32, 4, 2, 0, 0, 1, 0, 4>: HasQuerySizeLod`
LL | *output = image.query_size_lod(0);
| ^^^^^^^^^^^^^^ the trait `HasQuerySizeLod` is not implemented for `Image<f32, 4, 2, 0, 0, 1, 0, 4>`
|
= help: the following other types implement trait `HasQuerySizeLod`:
Image<SampledType, 0, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 1, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 2, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 3, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
help: the following other types implement trait `HasQuerySizeLod`
--> $SPIRV_STD_SRC/image.rs:2089:1
|
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 0, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 1, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 2, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 3, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
note: required by a bound in `Image::<SampledType, DIM, DEPTH, ARRAYED, spirv_std::::image::{impl#7}::{constant#0}, SAMPLED, FORMAT, COMPONENTS>::query_size_lod`
--> $SPIRV_STD_SRC/image.rs:1084:15
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,44 @@ error[E0277]: the trait bound `Image<f32, 4, 2, 0, 0, 1, 0, 4>: HasQuerySizeLod`
LL | *output = rect_sampled.query_size_lod(0);
| ^^^^^^^^^^^^^^ the trait `HasQuerySizeLod` is not implemented for `Image<f32, 4, 2, 0, 0, 1, 0, 4>`
|
= help: the following other types implement trait `HasQuerySizeLod`:
Image<SampledType, 0, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 1, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 2, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
Image<SampledType, 3, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>
help: the following other types implement trait `HasQuerySizeLod`
--> /image.rs:2089:1
|
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 0, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 1, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 2, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
...
LL | / impl<
LL | | SampledType: SampleType<FORMAT, COMPONENTS>,
LL | | const DEPTH: u32,
LL | | const FORMAT: u32,
... |
LL | | COMPONENTS,
LL | | >
| |_____^ `Image<SampledType, 3, DEPTH, ARRAYED, 0, SAMPLED, FORMAT, COMPONENTS>`
note: required by a bound in `SampledImage::<Image<SampledType, DIM, DEPTH, ARRAYED, spirv_std::::image::{impl#9}::{constant#0}, SAMPLED, FORMAT, COMPONENTS>>::query_size_lod`
--> /image.rs:1253:12
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ LL | fn h_newtyped(xyz: ((&u32, &u32, &u32),)) -> (u32, u32, u32) {

error: error:0:0 - OpLoad Pointer <id> '$ID[%$ID]' is not a logical pointer.
%39 = OpLoad %uint %38

|
= note: spirv-val failed
= note: module `$TEST_BUILD_DIR/lang/core/ref/member_ref_arg-broken`
Expand Down
Loading
Loading