diff --git a/Cargo.lock b/Cargo.lock index 8d271e3..27d310c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -759,9 +759,9 @@ dependencies = [ [[package]] name = "glam" -version = "0.21.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" +checksum = "12f597d56c1bd55a811a1be189459e8fad2bbc272616375602443bdfb37fa774" dependencies = [ "num-traits", ] @@ -1702,7 +1702,7 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_codegen_spirv" version = "0.4.0-alpha.15" -source = "git+https://github.com/Rust-GPU/rust-gpu?rev=985007fc#985007fc087bb9952106eb3015357bb019e7916a" +source = "git+https://github.com/Rust-GPU/rust-gpu?rev=dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0#dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0" dependencies = [ "ar", "bimap", @@ -1710,6 +1710,8 @@ dependencies = [ "indexmap", "libc", "num-traits", + "once_cell", + "regex", "rspirv", "rustc-demangle", "rustc_codegen_spirv-types", @@ -1724,7 +1726,7 @@ dependencies = [ [[package]] name = "rustc_codegen_spirv-types" version = "0.4.0-alpha.15" -source = "git+https://github.com/Rust-GPU/rust-gpu?rev=985007fc#985007fc087bb9952106eb3015357bb019e7916a" +source = "git+https://github.com/Rust-GPU/rust-gpu?rev=dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0#dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0" dependencies = [ "rspirv", "serde", @@ -1916,7 +1918,7 @@ dependencies = [ [[package]] name = "spirv-builder" version = "0.4.0-alpha.15" -source = "git+https://github.com/Rust-GPU/rust-gpu?rev=985007fc#985007fc087bb9952106eb3015357bb019e7916a" +source = "git+https://github.com/Rust-GPU/rust-gpu?rev=dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0#dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0" dependencies = [ "memchr", "raw-string", @@ -1929,7 +1931,7 @@ dependencies = [ [[package]] name = "spirv-std" version = "0.4.0-alpha.15" -source = "git+https://github.com/Rust-GPU/rust-gpu?rev=985007fc#985007fc087bb9952106eb3015357bb019e7916a" +source = "git+https://github.com/Rust-GPU/rust-gpu?rev=dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0#dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0" dependencies = [ "bitflags", "glam", @@ -1941,7 +1943,7 @@ dependencies = [ [[package]] name = "spirv-std-macros" version = "0.4.0-alpha.15" -source = "git+https://github.com/Rust-GPU/rust-gpu?rev=985007fc#985007fc087bb9952106eb3015357bb019e7916a" +source = "git+https://github.com/Rust-GPU/rust-gpu?rev=dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0#dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0" dependencies = [ "proc-macro2", "quote", @@ -1952,22 +1954,22 @@ dependencies = [ [[package]] name = "spirv-std-types" version = "0.4.0-alpha.15" -source = "git+https://github.com/Rust-GPU/rust-gpu?rev=985007fc#985007fc087bb9952106eb3015357bb019e7916a" +source = "git+https://github.com/Rust-GPU/rust-gpu?rev=dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0#dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0" [[package]] name = "spirv-tools" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca7f0f689581589b0a31000317fa31257cb24d040227708718ebd9fedf5cdd2b" +checksum = "dc7c8ca2077515286505bd3ccd396e55ac5706e80322e1d6d22a82e1cad4f7c3" dependencies = [ "spirv-tools-sys", ] [[package]] name = "spirv-tools-sys" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2980b0b4b2a9b5edfeb1dc8a35e84aac07b9c6dcd2339cce004d9355fb62a59d" +checksum = "b4b32d9d6469cd6b50dcd6bd841204b5946b4fb7b70a97872717cdc417659c9a" dependencies = [ "cc", ] diff --git a/crates/coremem/Cargo.toml b/crates/coremem/Cargo.toml index 4bffc17..2e7f5c1 100644 --- a/crates/coremem/Cargo.toml +++ b/crates/coremem/Cargo.toml @@ -37,9 +37,9 @@ wgpu = "0.12" # TODO: update to 0.13 # wgpu = { version = "0.13", features = ["spirv", "vulkan-portability"] } # MIT or Apache 2.0 # spirv-* is MIT or Apache 2.0 -spirv-builder = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "985007fc", features = ["use-compiled-tools"] } -spirv-std = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "985007fc" } -spirv-std-macros = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "985007fc" } +spirv-builder = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0", features = ["use-compiled-tools"] } +spirv-std = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0" } +spirv-std-macros = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0" } spirv_backend = { path = "../spirv_backend" } spirv_backend_runner = { path = "../spirv_backend_runner" } coremem_cross = { path = "../cross", features = ["iter", "fmt", "serde", "std"] } diff --git a/crates/coremem/src/sim/spirv/mod.rs b/crates/coremem/src/sim/spirv/mod.rs index cb40887..e30e4d5 100644 --- a/crates/coremem/src/sim/spirv/mod.rs +++ b/crates/coremem/src/sim/spirv/mod.rs @@ -638,7 +638,7 @@ mod test { // 512 cells for it to propagate back from the conductor. // the wave crosses 0.577 cells per step (Courant value), so roughly 2662 steps // for the wave to return home. - for t in 0..2662 { + for _t in 0..2662 { sim.step(); } diff --git a/crates/coremem/src/worker.rs b/crates/coremem/src/worker.rs index 1e6ece6..8d46bd0 100644 --- a/crates/coremem/src/worker.rs +++ b/crates/coremem/src/worker.rs @@ -136,7 +136,7 @@ mod test { let mut pool: JobPool = JobPool::new(0); pool.spawn_workers(2, move |x| { // wait until caller unlocks us - let _ = worker_mutex.lock().unwrap(); + let _lock = worker_mutex.lock().unwrap(); x*2 }); pool.send(1); diff --git a/crates/cross/src/dim/dim_slice.rs b/crates/cross/src/dim/dim_slice.rs index 88a702d..2e348ec 100644 --- a/crates/cross/src/dim/dim_slice.rs +++ b/crates/cross/src/dim/dim_slice.rs @@ -1,4 +1,5 @@ use core::convert::{AsMut, AsRef}; +#[cfg(feature = "iter")] use core::iter::Zip; use core::ops::{Index, IndexMut}; @@ -123,7 +124,10 @@ impl IntoIterator for DimSlice { } pub struct DimIter { + // fields are unused if `iter` feature is disabled + #[allow(unused)] idx: Vec3u, + #[allow(unused)] dim: Vec3u, } diff --git a/crates/cross/src/dim/offset_dim_slice.rs b/crates/cross/src/dim/offset_dim_slice.rs index 400a5cb..a07dcf5 100644 --- a/crates/cross/src/dim/offset_dim_slice.rs +++ b/crates/cross/src/dim/offset_dim_slice.rs @@ -1,4 +1,5 @@ use core::convert::{AsMut, AsRef}; +#[cfg(feature = "iter")] use core::iter::Zip; use core::ops::{Index, IndexMut}; @@ -81,7 +82,10 @@ impl IntoIterator for OffsetDimSlice { } pub struct OffsetDimIter { + // fields are unused if `iter` feature is disabled + #[allow(unused)] offset: Vec3u, + #[allow(unused)] inner: DimIter, } diff --git a/crates/spirv_backend/Cargo.toml b/crates/spirv_backend/Cargo.toml index 4f43a22..9c5c7c9 100644 --- a/crates/spirv_backend/Cargo.toml +++ b/crates/spirv_backend/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" crate-type = ["dylib", "lib"] [dependencies] -spirv-std = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "985007fc", features = ["glam"] } # MIT or Apache 2.0 +spirv-std = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0", features = ["glam"] } # MIT or Apache 2.0 coremem_cross = { path = "../cross" } diff --git a/crates/spirv_backend/src/lib.rs b/crates/spirv_backend/src/lib.rs index 83e8824..e8ef1f1 100644 --- a/crates/spirv_backend/src/lib.rs +++ b/crates/spirv_backend/src/lib.rs @@ -1,16 +1,12 @@ #![cfg_attr( target_arch = "spirv", - feature(register_attr), - register_attr(spirv), no_std )] #![feature(const_fn_floating_point_arithmetic)] extern crate spirv_std; -use spirv_std::{glam, RuntimeArray}; -#[cfg(not(target_arch = "spirv"))] -use spirv_std::macros::spirv; +use spirv_std::{glam, RuntimeArray, spirv}; mod adapt; mod support; @@ -20,6 +16,8 @@ use coremem_cross::real::R32; use coremem_cross::step::SimMeta; use coremem_cross::vec::{Vec3, Vec3u}; +use core::stringify; + type Iso3R1 = IsoConductorOr; fn glam_vec_to_internal(v: glam::UVec3) -> Vec3u { diff --git a/crates/spirv_backend/src/support.rs b/crates/spirv_backend/src/support.rs index 60c951f..ded2a04 100644 --- a/crates/spirv_backend/src/support.rs +++ b/crates/spirv_backend/src/support.rs @@ -1,3 +1,4 @@ +use core::debug_assert; use core::ops::{Index, IndexMut}; use spirv_std::RuntimeArray; diff --git a/crates/spirv_backend_builder/Cargo.toml b/crates/spirv_backend_builder/Cargo.toml index 2ee30aa..a1c5699 100644 --- a/crates/spirv_backend_builder/Cargo.toml +++ b/crates/spirv_backend_builder/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Colin "] edition = "2021" [dependencies] -spirv-builder = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "985007fc", features = ["use-compiled-tools"] } +spirv-builder = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "dcf37b75a7f9e7a94f52c8a3a5d93af795e34cd0", features = ["use-compiled-tools"] } # these deps are to satisfy internal rustc stuff, since spirv-builder links into rustc internals (HACK). # this needs to match the rustc lock file -- not just its Cargo.toml -- so we pin down to the patch level diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7d18006..ecac634 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2022-08-29" +channel = "nightly-2022-09-25" components = [ "rust-src", "rustc-dev", "llvm-tools-preview" ] targets = [ "x86_64-unknown-linux-gnu" ] profile = "default"