Skip to content

Commit

Permalink
Upgrade wgpu
Browse files Browse the repository at this point in the history
  • Loading branch information
nanoqsh committed Jul 22, 2024
1 parent 047f736 commit ee10896
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dunge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ bytemuck.workspace = true
glam.workspace = true
instant = { version = "0.1", optional = true }
log.workspace = true
wgpu = { version = "0.20", default-features = false, features = ["naga-ir"] }
wgpu = { version = "22.0", default-features = false, features = ["naga-ir"] }

[dependencies.winit]
version = "0.30"
Expand All @@ -28,7 +28,7 @@ optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
instant = { version = "0.1", features = ["wasm-bindgen"], optional = true }
wgpu = { version = "0.20", default-features = false, features = ["webgpu"] }
wgpu = { version = "22.0", default-features = false, features = ["webgpu"] }
web-sys = { version = "0.3", features = ["Document", "Window", "Element"] }

[target.'cfg(target_os = "android")'.dependencies.winit]
Expand Down
1 change: 1 addition & 0 deletions dunge/src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ impl<V, I> Layer<V, I> {
targets: &targets,
}),
multiview: None,
cache: None,
};

let render = state.device().create_render_pipeline(&desc);
Expand Down
2 changes: 1 addition & 1 deletion dunge_shader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rust-version.workspace = true
[dependencies]
glam.workspace = true
log.workspace = true
naga = "0.20"
naga = "22.0"

[features]
wgsl = ["naga/wgsl-out"]
Expand Down
6 changes: 3 additions & 3 deletions dunge_shader/src/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -946,11 +946,11 @@ impl Statements {
match self.0.last_mut() {
Some(Statement::Emit(top)) => {
if let Statement::Emit(new) = &st {
let top_range = top.zero_based_index_range();
let new_range = new.zero_based_index_range();
let top_range = top.index_range();
let new_range = new.index_range();
if top_range.end == new_range.start {
let merged = top_range.start..new_range.end;
*top = Range::from_zero_based_index_range(merged, exprs);
*top = Range::from_index_range(merged, exprs);
return;
}
}
Expand Down

0 comments on commit ee10896

Please sign in to comment.