mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
Update to wgpu 0.20 (#4433)
updates the wgpu version to 0.20 and changes the API calls accordingly.
I had to update wasm-bindgen to "0.2.92". Otherwise, I got this error
for the demo app:
```
error: failed to select a version for `wasm-bindgen`.
... required by package `js-sys v0.3.69`
... which satisfies dependency `js-sys = "^0.3.69"` of package `eframe v0.27.2 (/home/user/Projects/egui/crates/eframe)`
... which satisfies path dependency `eframe` (locked to 0.27.2) of package `confirm_exit v0.1.0 (/home/user/Projects/egui/examples/confirm_exit)`
versions that meet the requirements `^0.2.92` are: 0.2.92
all possible versions conflict with previously selected packages.
previously selected package `wasm-bindgen v0.2.90`
... which satisfies dependency `wasm-bindgen = "=0.2.90"` of package `egui_demo_app v0.27.2 (/home/user/Projects/egui/crates/egui_demo_app)`
failed to select a version for `wasm-bindgen` which could resolve this conflict
```
Why is it locked to this version right now?
I ran the tests, checked the web demo and my own projects, and
everything seems to work fine with wgpu 0.20.
---------
Co-authored-by: Andreas Reich <r_andreas2@web.de>
This commit is contained in:
@@ -293,6 +293,7 @@ impl Renderer {
|
||||
// 2: uint color
|
||||
attributes: &wgpu::vertex_attr_array![0 => Float32x2, 1 => Float32x2, 2 => Uint32],
|
||||
}],
|
||||
compilation_options: wgpu::PipelineCompilationOptions::default()
|
||||
},
|
||||
primitive: wgpu::PrimitiveState {
|
||||
topology: wgpu::PrimitiveTopology::TriangleList,
|
||||
@@ -334,6 +335,7 @@ impl Renderer {
|
||||
}),
|
||||
write_mask: wgpu::ColorWrites::ALL,
|
||||
})],
|
||||
compilation_options: wgpu::PipelineCompilationOptions::default()
|
||||
}),
|
||||
multiview: None,
|
||||
}
|
||||
|
||||
@@ -85,6 +85,6 @@ rfd = { version = "0.13", optional = true }
|
||||
|
||||
# web:
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
wasm-bindgen = "=0.2.90"
|
||||
wasm-bindgen = "=0.2.92"
|
||||
wasm-bindgen-futures = "0.4"
|
||||
web-sys = "0.3"
|
||||
|
||||
@@ -49,11 +49,13 @@ impl Custom3d {
|
||||
module: &shader,
|
||||
entry_point: "vs_main",
|
||||
buffers: &[],
|
||||
compilation_options: wgpu::PipelineCompilationOptions::default(),
|
||||
},
|
||||
fragment: Some(wgpu::FragmentState {
|
||||
module: &shader,
|
||||
entry_point: "fs_main",
|
||||
targets: &[Some(wgpu_render_state.target_format.into())],
|
||||
compilation_options: wgpu::PipelineCompilationOptions::default(),
|
||||
}),
|
||||
primitive: wgpu::PrimitiveState::default(),
|
||||
depth_stencil: None,
|
||||
|
||||
Reference in New Issue
Block a user