diff --git a/Cargo.toml b/Cargo.toml index 4828485..106373d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ prune = [] allow_deprecated = [] [dependencies] -naga = { version = "0.20", features = ["wgsl-in", "wgsl-out"] } +naga = { version = "22", features = ["wgsl-in", "wgsl-out"] } tracing = "0.1" regex = "1.8" regex-syntax = "0.8" @@ -31,6 +31,6 @@ once_cell = "1.17.0" indexmap = "2" [dev-dependencies] -wgpu = { version = "0.20", features = ["naga-ir"] } +wgpu = { version = "22", features = ["naga-ir"] } futures-lite = "1" tracing-subscriber = { version = "0.3", features = ["std", "fmt"] } diff --git a/src/compose/error.rs b/src/compose/error.rs index 171e3f3..5b747e4 100644 --- a/src/compose/error.rs +++ b/src/compose/error.rs @@ -78,7 +78,7 @@ pub enum ComposerErrorInner { WgslParseError(naga::front::wgsl::ParseError), #[cfg(feature = "glsl")] #[error("{0:?}")] - GlslParseError(naga::front::glsl::ParseError), + GlslParseError(naga::front::glsl::ParseErrors), #[error("naga_oil bug, please file a report: failed to convert imported module IR back into WGSL for use with WGSL shaders: {0}")] WgslBackError(naga::back::wgsl::Error), #[cfg(feature = "glsl")] diff --git a/src/compose/test.rs b/src/compose/test.rs index 572c7ea..fbd7054 100644 --- a/src/compose/test.rs +++ b/src/compose/test.rs @@ -1339,6 +1339,7 @@ mod test { module: &shader_module, entry_point: "run_test", compilation_options: Default::default(), + cache: None, }); let bindgroup = device.create_bind_group(&BindGroupDescriptor { diff --git a/src/compose/tests/expected/err_validation_1.txt b/src/compose/tests/expected/err_validation_1.txt index b855cdd..0385c62 100644 --- a/src/compose/tests/expected/err_validation_1.txt +++ b/src/compose/tests/expected/err_validation_1.txt @@ -1,10 +1,10 @@ -error: failed to build a valid final module: Function [2] 'func' is invalid +error: failed to build a valid final module: Function [1] 'func' is invalid ┌─ tests/error_test/wgsl_valid_err.wgsl:7:1 │ 7 │ ╭ fn func() -> f32 { 8 │ │ return 1u; - │ │ ^^ naga::Expression [1] - │ ╰──────────────^ naga::Function [2] + │ │ ^^ naga::Expression [0] + │ ╰──────────────^ naga::Function [1] │ - = The `return` value Some([1]) does not match the function return value + = The `return` value Some([0]) does not match the function return value diff --git a/src/compose/tests/expected/err_validation_2.txt b/src/compose/tests/expected/err_validation_2.txt index 9bd41d1..edabfeb 100644 --- a/src/compose/tests/expected/err_validation_2.txt +++ b/src/compose/tests/expected/err_validation_2.txt @@ -1,10 +1,10 @@ -error: failed to build a valid final module: Function [1] 'valid_inc::func' is invalid +error: failed to build a valid final module: Function [0] 'valid_inc::func' is invalid ┌─ tests/error_test/wgsl_valid_err.wgsl:7:1 │ 7 │ ╭ fn func() -> f32 { 8 │ │ return 1u; - │ │ ^^ naga::Expression [1] - │ ╰──────────────^ naga::Function [1] + │ │ ^^ naga::Expression [0] + │ ╰──────────────^ naga::Function [0] │ - = The `return` value Some([1]) does not match the function return value + = The `return` value Some([0]) does not match the function return value diff --git a/src/derive.rs b/src/derive.rs index 058f276..8aeef3e 100644 --- a/src/derive.rs +++ b/src/derive.rs @@ -379,7 +379,7 @@ impl<'a> DerivedModule<'a> { pointer: map_expr!(pointer), fun, value: map_expr!(value), - result: map_expr!(result), + result: map_expr_opt!(result), } } Statement::WorkGroupUniformLoad { pointer, result } => {