From 755fc5b1a7fbd1561b0849d0b2c35f2b32bd3f12 Mon Sep 17 00:00:00 2001 From: Sepcnt <30561671+sepcnt@users.noreply.github.com> Date: Sun, 10 Mar 2024 09:02:48 +0800 Subject: [PATCH] Upgrade naga dependency to 0.19 (#515) Co-authored-by: sepcnt --- crates/shaders/Cargo.toml | 4 ++-- crates/shaders/src/compile/mod.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/shaders/Cargo.toml b/crates/shaders/Cargo.toml index 37f439c69..b41e9c453 100644 --- a/crates/shaders/Cargo.toml +++ b/crates/shaders/Cargo.toml @@ -34,10 +34,10 @@ msl = [] workspace = true [dependencies] -naga = { version = "0.13", features = ["wgsl-in", "msl-out", "validate"], optional = true } +naga = { version = "0.19", features = ["wgsl-in", "msl-out",], optional = true } thiserror = { version = "1.0.57", optional = true } [build-dependencies] -naga = { version = "0.13", features = ["wgsl-in", "msl-out", "validate"] } +naga = { version = "0.19", features = ["wgsl-in", "msl-out",] } thiserror = "1.0.57" diff --git a/crates/shaders/src/compile/mod.rs b/crates/shaders/src/compile/mod.rs index 8cf0f06a6..08792043e 100644 --- a/crates/shaders/src/compile/mod.rs +++ b/crates/shaders/src/compile/mod.rs @@ -78,10 +78,10 @@ impl ShaderInfo { .. } => u32::from(*size) * stride, naga::TypeInner::Struct { span, .. } => *span, - naga::TypeInner::Scalar { width, .. } => *width as u32, - naga::TypeInner::Vector { width, .. } => *width as u32, - naga::TypeInner::Matrix { width, .. } => *width as u32, - naga::TypeInner::Atomic { width, .. } => *width as u32, + naga::TypeInner::Scalar(scalar) => scalar.width as u32, + naga::TypeInner::Vector { scalar, .. } => scalar.width as u32, + naga::TypeInner::Matrix { scalar, .. } => scalar.width as u32, + naga::TypeInner::Atomic(scalar) => scalar.width as u32, _ => { // Not a valid workgroup variable type. At least not one that is used // in our shaders.