From 151c9d31899ccd7ab4efc5198740df3765b5a8c8 Mon Sep 17 00:00:00 2001 From: Okko Hakola Date: Tue, 5 Nov 2024 14:00:29 +0200 Subject: [PATCH 1/2] Update to wgpu 23 --- Cargo.toml | 18 +++++++++--------- examples/game_of_life/main.rs | 6 +++--- examples/shader_with_includes/main.rs | 4 ++-- examples/triangle/main.rs | 4 ++-- src/pipelines/bloom/pipeline.rs | 18 +++++++++--------- src/pipelines/line/pipeline.rs | 4 ++-- src/pipelines/paste/pipeline.rs | 4 ++-- src/pipelines/quad/pipeline.rs | 4 ++-- src/pipelines/tonemapping/pipeline.rs | 4 ++-- 9 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c1d2ce9..73e1842 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,11 +12,11 @@ egui_persistence = ["egui_gui", "egui/persistence", "egui_demo_lib/serde"] wgpu_serde = ["wgpu/serde"] [dependencies] -indexmap = "2.2" -pollster = "0.3" +indexmap = "2.6" +pollster = "0.4" image = "0.25" -bytemuck = { version = "1.16", features = ["derive"] } -wgpu = { version = "22.1.0", features = ["naga-ir"] } +bytemuck = { version = "1.19", features = ["derive"] } +wgpu = { version = "23.0", features = ["naga-ir"] } winit = { version = "0.30" } path-clean = "1.0.1" notify = "6.1" @@ -24,11 +24,11 @@ flume = "0.11" log = "0.4" # Optional Egui -egui = { version = "0.29", optional = true } -egui-wgpu = { version = "0.29", optional = true } -egui-winit = { version = "0.29", optional = true } -egui_extras = { version = "0.29", optional = true } -egui_demo_lib = { version = "0.29", optional = true } +egui = { git = "https://github.com/emilk/egui.git", rev = "5d6a58b9176c2ae807928293da8a4e68f1c70d13", version = "0.29", optional = true } +egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "5d6a58b9176c2ae807928293da8a4e68f1c70d13", version = "0.29", optional = true } +egui-winit = { git = "https://github.com/emilk/egui.git", rev = "5d6a58b9176c2ae807928293da8a4e68f1c70d13", version = "0.29", optional = true } +egui_extras = { git = "https://github.com/emilk/egui.git", rev = "5d6a58b9176c2ae807928293da8a4e68f1c70d13", version = "0.29", optional = true } +egui_demo_lib = { git = "https://github.com/emilk/egui.git", rev = "5d6a58b9176c2ae807928293da8a4e68f1c70d13", version = "0.29", optional = true } egui_plot = { version = "0.29", optional = true } [dev-dependencies] diff --git a/examples/game_of_life/main.rs b/examples/game_of_life/main.rs index 2685f71..5551f6f 100644 --- a/examples/game_of_life/main.rs +++ b/examples/game_of_life/main.rs @@ -545,7 +545,7 @@ fn create_game_of_life_pipeline( label: Some("Init Pipeline"), layout: Some(&game_of_life_init_layout), module: &game_of_life_shader, - entry_point: "init", + entry_point: Some("init"), compilation_options: Default::default(), cache: None, }); @@ -567,7 +567,7 @@ fn create_game_of_life_pipeline( label: Some("Update Pipeline"), layout: Some(&game_of_life_layout), module: &game_of_life_shader, - entry_point: "update", + entry_point: Some("update"), compilation_options: Default::default(), cache: None, }); @@ -588,7 +588,7 @@ fn create_game_of_life_pipeline( label: Some("Draw Pipeline"), layout: Some(&draw_layout), module: &brush_shader, - entry_point: "main", + entry_point: Some("main"), compilation_options: Default::default(), cache: None, }); diff --git a/examples/shader_with_includes/main.rs b/examples/shader_with_includes/main.rs index 266c373..e9d3c86 100644 --- a/examples/shader_with_includes/main.rs +++ b/examples/shader_with_includes/main.rs @@ -110,13 +110,13 @@ fn create_triangle_pipeline(context: &GlassContext) -> RenderPipeline { layout: Some(&layout), vertex: wgpu::VertexState { module: &shader, - entry_point: "vs_main", + entry_point: Some("vs_main"), compilation_options: Default::default(), buffers: &[], }, fragment: Some(wgpu::FragmentState { module: &shader, - entry_point: "fs_main", + entry_point: Some("fs_main"), compilation_options: Default::default(), targets: &[Some(TextureFormat::Bgra8UnormSrgb.into())], }), diff --git a/examples/triangle/main.rs b/examples/triangle/main.rs index 4341bc2..2eb66d2 100644 --- a/examples/triangle/main.rs +++ b/examples/triangle/main.rs @@ -81,13 +81,13 @@ fn create_triangle_pipeline(context: &GlassContext) -> RenderPipeline { layout: Some(&layout), vertex: wgpu::VertexState { module: &shader, - entry_point: "vs_main", + entry_point: Some("vs_main"), compilation_options: Default::default(), buffers: &[], }, fragment: Some(wgpu::FragmentState { module: &shader, - entry_point: "fs_main", + entry_point: Some("fs_main"), compilation_options: Default::default(), targets: &[Some(TextureFormat::Bgra8UnormSrgb.into())], }), diff --git a/src/pipelines/bloom/pipeline.rs b/src/pipelines/bloom/pipeline.rs index 9ec2418..154dbd8 100644 --- a/src/pipelines/bloom/pipeline.rs +++ b/src/pipelines/bloom/pipeline.rs @@ -16,7 +16,7 @@ use crate::{ texture::Texture, }; -const BLOOM_TEXTURE_FORMAT: TextureFormat = TextureFormat::Rg11b10Float; +const BLOOM_TEXTURE_FORMAT: TextureFormat = TextureFormat::Rg11b10Ufloat; const FINAL_TEXTURE_FORMAT: TextureFormat = TextureFormat::Rgba16Float; const MAX_MIP_DIMENSION: u32 = 512; @@ -117,13 +117,13 @@ impl BloomPipeline { layout: Some(&layout), vertex: wgpu::VertexState { module: &shader, - entry_point: "vs_main", + entry_point: Some("vs_main"), compilation_options: Default::default(), buffers: &[SimpleTexturedVertex::desc()], }, fragment: Some(wgpu::FragmentState { module: &shader, - entry_point: "downsample_first", + entry_point: Some("downsample_first"), compilation_options: Default::default(), targets: &[Some(ColorTargetState { format: BLOOM_TEXTURE_FORMAT, @@ -142,13 +142,13 @@ impl BloomPipeline { layout: Some(&layout), vertex: wgpu::VertexState { module: &shader, - entry_point: "vs_main", + entry_point: Some("vs_main"), compilation_options: Default::default(), buffers: &[SimpleTexturedVertex::desc()], }, fragment: Some(wgpu::FragmentState { module: &shader, - entry_point: "downsample", + entry_point: Some("downsample"), compilation_options: Default::default(), targets: &[Some(ColorTargetState { format: BLOOM_TEXTURE_FORMAT, @@ -181,13 +181,13 @@ impl BloomPipeline { layout: Some(&layout), vertex: wgpu::VertexState { module: &shader, - entry_point: "vs_main", + entry_point: Some("vs_main"), compilation_options: Default::default(), buffers: &[SimpleTexturedVertex::desc()], }, fragment: Some(wgpu::FragmentState { module: &shader, - entry_point: "upsample", + entry_point: Some("upsample"), compilation_options: Default::default(), targets: &[Some(ColorTargetState { format: BLOOM_TEXTURE_FORMAT, @@ -214,13 +214,13 @@ impl BloomPipeline { layout: Some(&layout), vertex: wgpu::VertexState { module: &shader, - entry_point: "vs_main", + entry_point: Some("vs_main"), compilation_options: Default::default(), buffers: &[SimpleTexturedVertex::desc()], }, fragment: Some(wgpu::FragmentState { module: &shader, - entry_point: "upsample", + entry_point: Some("upsample"), compilation_options: Default::default(), targets: &[Some(ColorTargetState { format: FINAL_TEXTURE_FORMAT, diff --git a/src/pipelines/line/pipeline.rs b/src/pipelines/line/pipeline.rs index 1fd082e..ce1d195 100644 --- a/src/pipelines/line/pipeline.rs +++ b/src/pipelines/line/pipeline.rs @@ -47,13 +47,13 @@ impl LinePipeline { layout: Some(&layout), vertex: wgpu::VertexState { module: &shader, - entry_point: "vs_main", + entry_point: Some("vs_main"), compilation_options: Default::default(), buffers: &[ColoredVertex::desc()], }, fragment: Some(wgpu::FragmentState { module: &shader, - entry_point: "fs_main", + entry_point: Some("fs_main"), compilation_options: Default::default(), targets: &[Some(color_target_state)], }), diff --git a/src/pipelines/paste/pipeline.rs b/src/pipelines/paste/pipeline.rs index 7301f92..4e450a1 100644 --- a/src/pipelines/paste/pipeline.rs +++ b/src/pipelines/paste/pipeline.rs @@ -117,13 +117,13 @@ impl PastePipeline { layout: Some(&layout), vertex: wgpu::VertexState { module: &shader, - entry_point: "vs_main", + entry_point: Some("vs_main"), compilation_options: Default::default(), buffers: &[TexturedVertex::desc()], }, fragment: Some(wgpu::FragmentState { module: &shader, - entry_point: "fragment", + entry_point: Some("fragment"), compilation_options: Default::default(), targets: &[Some(ColorTargetState { format: target_texture_format, diff --git a/src/pipelines/quad/pipeline.rs b/src/pipelines/quad/pipeline.rs index c6b7a4e..997bc95 100644 --- a/src/pipelines/quad/pipeline.rs +++ b/src/pipelines/quad/pipeline.rs @@ -79,13 +79,13 @@ impl QuadPipeline { layout: Some(&layout), vertex: wgpu::VertexState { module: &shader, - entry_point: "vs_main", + entry_point: Some("vs_main"), compilation_options: Default::default(), buffers: &[TexturedVertex::desc()], }, fragment: Some(wgpu::FragmentState { module: &shader, - entry_point: "fs_main", + entry_point: Some("fs_main"), compilation_options: Default::default(), targets: &[Some(color_target_state)], }), diff --git a/src/pipelines/tonemapping/pipeline.rs b/src/pipelines/tonemapping/pipeline.rs index fc071c7..1277fbd 100644 --- a/src/pipelines/tonemapping/pipeline.rs +++ b/src/pipelines/tonemapping/pipeline.rs @@ -68,13 +68,13 @@ impl TonemappingPipeline { layout: Some(&layout), vertex: wgpu::VertexState { module: &shader, - entry_point: "vs_main", + entry_point: Some("vs_main"), compilation_options: Default::default(), buffers: &[SimpleTexturedVertex::desc()], }, fragment: Some(wgpu::FragmentState { module: &shader, - entry_point: "fragment", + entry_point: Some("fragment"), compilation_options: Default::default(), targets: &[Some(ColorTargetState { format: TONEMAPPING_TEXTURE_FORMAT, From f31d5590659c78b544e8958cceae35cb1d9843c7 Mon Sep 17 00:00:00 2001 From: Okko Hakola Date: Fri, 20 Dec 2024 14:20:42 +0200 Subject: [PATCH 2/2] Update egui too --- Cargo.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 73e1842..ccea738 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,10 +12,10 @@ egui_persistence = ["egui_gui", "egui/persistence", "egui_demo_lib/serde"] wgpu_serde = ["wgpu/serde"] [dependencies] -indexmap = "2.6" +indexmap = "2.7" pollster = "0.4" image = "0.25" -bytemuck = { version = "1.19", features = ["derive"] } +bytemuck = { version = "1.20", features = ["derive"] } wgpu = { version = "23.0", features = ["naga-ir"] } winit = { version = "0.30" } path-clean = "1.0.1" @@ -24,12 +24,12 @@ flume = "0.11" log = "0.4" # Optional Egui -egui = { git = "https://github.com/emilk/egui.git", rev = "5d6a58b9176c2ae807928293da8a4e68f1c70d13", version = "0.29", optional = true } -egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "5d6a58b9176c2ae807928293da8a4e68f1c70d13", version = "0.29", optional = true } -egui-winit = { git = "https://github.com/emilk/egui.git", rev = "5d6a58b9176c2ae807928293da8a4e68f1c70d13", version = "0.29", optional = true } -egui_extras = { git = "https://github.com/emilk/egui.git", rev = "5d6a58b9176c2ae807928293da8a4e68f1c70d13", version = "0.29", optional = true } -egui_demo_lib = { git = "https://github.com/emilk/egui.git", rev = "5d6a58b9176c2ae807928293da8a4e68f1c70d13", version = "0.29", optional = true } -egui_plot = { version = "0.29", optional = true } +egui = { version = "0.30", optional = true } +egui-wgpu = { version = "0.30", optional = true } +egui-winit = { version = "0.30", optional = true } +egui_extras = { version = "0.30", optional = true } +egui_demo_lib = { version = "0.30", optional = true } +egui_plot = { version = "0.30", optional = true } [dev-dependencies] rapier2d = { version = "0.22", features = ["default", "debug-render"] }