From fbe501814802c05dc817536da1f53ea3f7ad62e7 Mon Sep 17 00:00:00 2001 From: j-dewey Date: Fri, 9 Feb 2024 15:32:05 -0500 Subject: [PATCH] Updated to wgpu 0.18.0 --- Cargo.toml | 2 +- examples/cube.rs | 8 ++++++-- examples/custom-texture.rs | 4 +++- examples/hello-world.rs | 5 ++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8ab8660..6c40ad7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ bytemuck = "1" imgui = "0.11" log = "0.4" smallvec = "1" -wgpu = "0.17" +wgpu = "0.18.0" [dev-dependencies] bytemuck = { version = "1.13", features = ["derive"] } diff --git a/examples/cube.rs b/examples/cube.rs index 39ee8f6..00a0b1b 100644 --- a/examples/cube.rs +++ b/examples/cube.rs @@ -307,10 +307,12 @@ impl Example { b: 0.3, a: 1.0, }), - store: true, + store: wgpu::StoreOp::Store, }, })], depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None }); rpass.push_debug_group("Prepare data for draw."); rpass.set_pipeline(&self.pipeline); @@ -566,10 +568,12 @@ fn main() { ops: wgpu::Operations { load: wgpu::LoadOp::Load, // Do not clear // load: wgpu::LoadOp::Clear(clear_color), - store: true, + store: wgpu::StoreOp::Store, }, })], depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None }); renderer diff --git a/examples/custom-texture.rs b/examples/custom-texture.rs index 87ed40f..8f6ccf0 100644 --- a/examples/custom-texture.rs +++ b/examples/custom-texture.rs @@ -229,10 +229,12 @@ fn main() { resolve_target: None, ops: wgpu::Operations { load: wgpu::LoadOp::Clear(clear_color), - store: true, + store: wgpu::StoreOp::Store, }, })], depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None }); renderer diff --git a/examples/hello-world.rs b/examples/hello-world.rs index e806824..a5f653c 100644 --- a/examples/hello-world.rs +++ b/examples/hello-world.rs @@ -191,6 +191,7 @@ fn main() { .position([400.0, 200.0], Condition::FirstUseEver) .build(|| { ui.text(format!("Frametime: {delta_s:?}")); + ui.text(format!("FPS: {}", 1.0 / delta_s.as_secs_f32())); }); ui.show_demo_window(&mut demo_open); @@ -214,10 +215,12 @@ fn main() { resolve_target: None, ops: wgpu::Operations { load: wgpu::LoadOp::Clear(clear_color), - store: true, + store: wgpu::StoreOp::Store, }, })], depth_stencil_attachment: None, + timestamp_writes: None, + occlusion_query_set: None }); renderer