Skip to content

Commit

Permalink
Update WGPU to version 22
Browse files Browse the repository at this point in the history
  • Loading branch information
callym committed Aug 1, 2024
1 parent 7031ca1 commit cb40995
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"] }
2 changes: 1 addition & 1 deletion src/compose/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
1 change: 1 addition & 0 deletions src/compose/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src/compose/tests/expected/err_validation_1.txt
Original file line number Diff line number Diff line change
@@ -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

8 changes: 4 additions & 4 deletions src/compose/tests/expected/err_validation_2.txt
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 } => {
Expand Down

0 comments on commit cb40995

Please sign in to comment.