Skip to content

Commit

Permalink
Update to wgpu 23 (#7)
Browse files Browse the repository at this point in the history
* Update to wgpu 23

* Update egui too
  • Loading branch information
hakolao authored Dec 20, 2024
1 parent 13de5db commit 6b2fde5
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 34 deletions.
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ egui_persistence = ["egui_gui", "egui/persistence", "egui_demo_lib/serde"]
wgpu_serde = ["wgpu/serde"]

[dependencies]
indexmap = "2.2"
pollster = "0.3"
indexmap = "2.7"
pollster = "0.4"
image = "0.25"
bytemuck = { version = "1.16", features = ["derive"] }
wgpu = { version = "22.1.0", features = ["naga-ir"] }
bytemuck = { version = "1.20", features = ["derive"] }
wgpu = { version = "23.0", features = ["naga-ir"] }
winit = { version = "0.30" }
path-clean = "1.0.1"
notify = "6.1"
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_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"] }
Expand Down
6 changes: 3 additions & 3 deletions examples/game_of_life/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand All @@ -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,
});
Expand All @@ -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,
});
Expand Down
4 changes: 2 additions & 2 deletions examples/shader_with_includes/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())],
}),
Expand Down
4 changes: 2 additions & 2 deletions examples/triangle/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())],
}),
Expand Down
18 changes: 9 additions & 9 deletions src/pipelines/bloom/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/pipelines/line/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)],
}),
Expand Down
4 changes: 2 additions & 2 deletions src/pipelines/paste/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/pipelines/quad/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)],
}),
Expand Down
4 changes: 2 additions & 2 deletions src/pipelines/tonemapping/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6b2fde5

Please sign in to comment.