From 8ae429497a1f18d01f052aa5d3dcb70a57a51ffb Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 22 Sep 2025 14:29:31 +1000 Subject: [PATCH 1/7] Fix incorrect identifier in comment in `rust-toolchain.toml`. --- rust-toolchain.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 695cb49f92..663e76414b 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -3,5 +3,5 @@ channel = "nightly-2025-06-23" components = ["rust-src", "rustc-dev", "llvm-tools"] # commit_hash = be19eda0dc4c22c5cf5f1b48fd163acf9bd4b0a6 -# Whenever changing the nightly channel, update the commit hash above, and make -# sure to change `REQUIRED_TOOLCHAIN` in `crates/rustc_codegen_spirv/build.rs` also. +# Whenever changing the nightly channel, update the commit hash above, and +# change `REQUIRED_RUST_TOOLCHAIN` in `crates/rustc_codegen_spirv/build.rs` too. From 61a7abb273649fa1d1dfd63d8b072460a23fe168 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 22 Sep 2025 14:30:21 +1000 Subject: [PATCH 2/7] Remove `.github/workflows/ISSUE_TEMPLATE/bug_report.md`. It's in the wrong place, and it's empty. There is also `.github/ISSUE_TEMPLATE/bug_report.md`, which is in the right place. --- .github/workflows/ISSUE_TEMPLATE/bug_report.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .github/workflows/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/workflows/ISSUE_TEMPLATE/bug_report.md b/.github/workflows/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index e69de29bb2..0000000000 From dfa08db582943e5af5ae05ae374f07f6813ff1ac Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 22 Sep 2025 14:38:19 +1000 Subject: [PATCH 3/7] Fix a typo. --- crates/spirv-std/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/spirv-std/README.md b/crates/spirv-std/README.md index fe399ca04e..9d2a8a1ca8 100644 --- a/crates/spirv-std/README.md +++ b/crates/spirv-std/README.md @@ -2,7 +2,7 @@ Core functions, traits, and more that make up a “standard library” for SPIR-V for use in [rust-gpu](https://github.com/rust-gpu/rust-gpu#readme). -This crate gives a `rust-gpu` shader access to the required `#![spirv(..)]` attribute, as well as povide all kinds of APIs that allows a shader to access GPU resources such as textures and buffers. Optionally, through the use of the `"glam"` feature, it includes some boilerplate trait implementations to make `glam` vector types compatible with these APIs. +This crate gives a `rust-gpu` shader access to the required `#![spirv(..)]` attribute, as well as provide all kinds of APIs that allows a shader to access GPU resources such as textures and buffers. Optionally, through the use of the `"glam"` feature, it includes some boilerplate trait implementations to make `glam` vector types compatible with these APIs. ## Example From 1bd30fd4ad570bb32d7ce20bd7a1170ef5cedffd Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 22 Sep 2025 14:39:42 +1000 Subject: [PATCH 4/7] Fix a mistake in the compiletests docs. --- tests/compiletests/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/compiletests/README.md b/tests/compiletests/README.md index 599f3b2899..1a48bcb438 100644 --- a/tests/compiletests/README.md +++ b/tests/compiletests/README.md @@ -59,7 +59,7 @@ full reference can be found in the ### Disassembly All disassembly will be dumped to stderr, which makes the testing framework compare it to the -contents of `path/to/test.rs.stdout`. +contents of `path/to/test.rs.stderr`. * `// compile-flags: -C llvm-args=--disassemble` disassemble the entire shader * `// compile-flags: -C llvm-args=--disassemble-globals` disassemble only globals and function declarations, excludes function contents From e8729919b84b55aea4ef7dbcd32b5d01b2034937 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 23 Sep 2025 10:05:23 +1000 Subject: [PATCH 5/7] Clarify the `Image!` docs. To clarify something I found hard to understand. --- crates/spirv-std/macros/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/spirv-std/macros/src/lib.rs b/crates/spirv-std/macros/src/lib.rs index c1f0d57ab9..aeed4277f8 100644 --- a/crates/spirv-std/macros/src/lib.rs +++ b/crates/spirv-std/macros/src/lib.rs @@ -113,7 +113,8 @@ use std::fmt::Write; /// when set the image format is unknown. /// Accepted values: `f32`, `f64`, `u8`, `u16`, `u32`, `u64`, `i8`, `i16`, `i32`, `i64`. /// - `format` — The image format of the image, mutually exclusive with `type`. -/// Accepted values: Snake case versions of [`ImageFormat`]. +/// Accepted values: Snake case versions of [`ImageFormat`] variants, e.g. `rgba32f`, +/// `rgba8_snorm`. /// - `sampled` — Whether it is known that the image will be used with a sampler. /// Accepted values: `true` or `false`. Default: `unknown`. /// - `multisampled` — Whether the image contains multisampled content. From 97b3b2f0d92e39a169739f5753a11a178fe1307d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 23 Sep 2025 10:42:33 +1000 Subject: [PATCH 6/7] Remove unnecessary clippy attribute. --- crates/spirv-std/macros/src/lib.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/spirv-std/macros/src/lib.rs b/crates/spirv-std/macros/src/lib.rs index aeed4277f8..006c70eb35 100644 --- a/crates/spirv-std/macros/src/lib.rs +++ b/crates/spirv-std/macros/src/lib.rs @@ -196,8 +196,6 @@ pub fn gpu_only(_attr: TokenStream, item: TokenStream) -> TokenStream { block, } = syn::parse_macro_input!(item as syn::ItemFn); - // FIXME(eddyb) this looks like a clippy false positive (`sig` is used below). - #[allow(clippy::redundant_clone)] let fn_name = sig.ident.clone(); let sig_cpu = syn::Signature { From 2a01df874f8ffca54d02a284cb2bb9812a30a97d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 23 Sep 2025 10:46:46 +1000 Subject: [PATCH 7/7] Fix `debug_printf!` docs. It mixes up `debug_printf!` and `debug_printfln!`. --- crates/spirv-std/macros/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/spirv-std/macros/src/lib.rs b/crates/spirv-std/macros/src/lib.rs index 006c70eb35..671a15eb2c 100644 --- a/crates/spirv-std/macros/src/lib.rs +++ b/crates/spirv-std/macros/src/lib.rs @@ -220,13 +220,13 @@ pub fn gpu_only(_attr: TokenStream, item: TokenStream) -> TokenStream { output.into() } -/// Print a formatted string with a newline using the debug printf extension. +/// Print a formatted string using the debug printf extension. /// /// Examples: /// /// ```rust,ignore -/// debug_printfln!("uv: %v2f", uv); -/// debug_printfln!("pos.x: %f, pos.z: %f, int: %i", pos.x, pos.z, int); +/// debug_printf!("uv: %v2f\n", uv); +/// debug_printf!("pos.x: %f, pos.z: %f, int: %i\n", pos.x, pos.z, int); /// ``` /// /// See for formatting rules.