Skip to content

Commit

Permalink
#59 Update vger and wgpu
Browse files Browse the repository at this point in the history
  • Loading branch information
wtholliday committed Dec 14, 2023
1 parent dd6062f commit 247d319
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ default = [ "winit" ]

[dependencies]
euclid = "0.22.7"
wgpu = "0.16.0"
wgpu = "0.18.0"
futures = "0.3"
vger = "0.2.7"
vger = "0.2.8"
accesskit = "0.11.0"
lazy_static = "1.4.0"
winit = { version = "0.28.1", optional = true }
Expand All @@ -33,7 +33,7 @@ winit = { version = "0.28.1", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2.76"
web-sys = { version = "=0.3.61", features = ["Location"] }
web-sys = { version = "^0.3.61", features = ["Location"] }
log = "0.4"
console_log = "0.1.2"
console_error_panic_hook = "0.1.6"
5 changes: 2 additions & 3 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,15 @@ impl Context {
.create_view(&wgpu::TextureViewDescriptor::default());

let desc = wgpu::RenderPassDescriptor {
label: None,
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view: &texture_view,
resolve_target: None,
ops: wgpu::Operations {
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),
store: true,
store: wgpu::StoreOp::Store,
},
})],
depth_stencil_attachment: None,
..<_>::default()
};

vger.encode(&desc);
Expand Down
8 changes: 3 additions & 5 deletions src/winit_event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ async fn setup(window: &Window) -> Setup {

// log::info!("Initializing the surface...");

let backend = wgpu::util::backend_bits_from_env().unwrap_or_else(wgpu::Backends::all);
let instance_desc = wgpu::InstanceDescriptor::default();

let instance = wgpu::Instance::new(instance_desc);
Expand All @@ -80,10 +79,9 @@ async fn setup(window: &Window) -> Setup {
let surface = instance.create_surface(&window);
(size, surface.unwrap())
};
let adapter =
wgpu::util::initialize_adapter_from_env_or_default(&instance, backend, Some(&surface))
.await
.expect("No suitable GPU adapters found on the system!");
let adapter = wgpu::util::initialize_adapter_from_env_or_default(&instance, Some(&surface))
.await
.expect("No suitable GPU adapters found on the system!");

#[cfg(not(target_arch = "wasm32"))]
{
Expand Down

0 comments on commit 247d319

Please sign in to comment.