Skip to content

Commit

Permalink
Deps: Update wgpu to 23.0.0.
Browse files Browse the repository at this point in the history
* `wgpu` API change: `entry_point`s are now optional.
* Had to update `wasm-bindgen-test` to keep wasm tests working.
  • Loading branch information
kpreid committed Oct 30, 2024
1 parent 30ceaed commit f63b163
Show file tree
Hide file tree
Showing 11 changed files with 306 additions and 246 deletions.
202 changes: 133 additions & 69 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,17 @@ snapbox = "0.6.10" # keep in sync with `trycmd`
strum = { version = "0.26.1", default-features = false, features = ["derive"] }
sync_wrapper = { version = "1.0.0", default-features = false }
tempfile = { version = "3.3.0", default-features = false }
thiserror = { version = "1.0.62", default-features = false }
thiserror = { version = "1.0.65", default-features = false }
time = { version = "0.3.36", default-features = false }
# Tokio is used for async test-running and for certain binaries.
# The library crates do not require Tokio.
tokio = { version = "1.28.0", default-features = false }
trycmd = "0.15.4" # keep in sync with `snapbox`
unicode-segmentation = { version = "1.10.1", default-features = false }
unicode-width = { version = "0.2", default-features = false }
wasm-bindgen-futures = { version = "0.4.42", default-features = false }
wasm-bindgen-futures = { version = "0.4.45", default-features = false }
web-time = { version = "1.1.0", default-features = false }
wgpu = { version = "22.1.0", default-features = false, features = ["wgsl"] }
wgpu = { version = "23.0.0", default-features = false, features = ["wgsl"] }
yield-progress = { version = "0.1.6", default-features = false }

# Note: Lints are also necessarily redefined in the workspaces other than this one.
Expand Down
1 change: 0 additions & 1 deletion all-is-cubes-desktop/src/winit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ pub fn winit_main_loop_and_init<Ren: RendererToWinit + 'static>(
}

/// Creates a [`DesktopSession`] that can be run in an [`winit`] event loop.
#[expect(clippy::large_stack_frames)]
pub async fn create_winit_wgpu_desktop_session(
executor: Arc<crate::Executor>,
session: Session,
Expand Down
2 changes: 1 addition & 1 deletion all-is-cubes-gpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ resource = "0.5.0"
send_wrapper = { workspace = true, features = ["futures"] }
wasm-bindgen-futures = { workspace = true }
# For initializing tests on web. (This is not a dev-dependency because some of said tests are not in this package.)
web-sys = { version = "0.3.69", features = ["OffscreenCanvas"] }
web-sys = { version = "0.3.72", features = ["OffscreenCanvas"] }
web-time = { workspace = true }
wgpu = { workspace = true, optional = true }

Expand Down
8 changes: 4 additions & 4 deletions all-is-cubes-gpu/src/in_wgpu/bloom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ impl BloomPipelines {
layout: Some(&pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.bloom.get(),
entry_point: "bloom_vertex",
entry_point: Some("bloom_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.bloom.get(),
entry_point: "bloom_downsample_fragment",
entry_point: Some("bloom_downsample_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: linear_scene_texture_format,
Expand All @@ -88,13 +88,13 @@ impl BloomPipelines {
layout: Some(&pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.bloom.get(),
entry_point: "bloom_vertex",
entry_point: Some("bloom_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.bloom.get(),
entry_point: "bloom_upsample_fragment",
entry_point: Some("bloom_upsample_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: linear_scene_texture_format,
Expand Down
26 changes: 13 additions & 13 deletions all-is-cubes-gpu/src/in_wgpu/pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ impl Pipelines {
layout: Some(&block_render_pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.blocks_and_lines.get(),
entry_point: "block_vertex_main",
entry_point: Some("block_vertex_main"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: vertex_buffers,
},
fragment: Some(wgpu::FragmentState {
module: shaders.blocks_and_lines.get(),
entry_point: "block_fragment_opaque",
entry_point: Some("block_fragment_opaque"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: fb.linear_scene_texture_format(),
Expand All @@ -219,19 +219,19 @@ impl Pipelines {
layout: Some(&block_render_pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.blocks_and_lines.get(),
entry_point: "block_vertex_main",
entry_point: Some("block_vertex_main"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: vertex_buffers,
},
fragment: Some(wgpu::FragmentState {
module: shaders.blocks_and_lines.get(),
entry_point: match current_graphics_options.transparency {
entry_point: Some(match current_graphics_options.transparency {
TransparencyOption::Volumetric => "block_fragment_transparent_volumetric",
TransparencyOption::Surface | TransparencyOption::Threshold(_) => {
"block_fragment_transparent_surface"
}
ref t => panic!("unimplemented transparency option {t:?}"),
},
}),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: fb.linear_scene_texture_format(),
Expand Down Expand Up @@ -274,13 +274,13 @@ impl Pipelines {
// uses the skybox texture too.
vertex: wgpu::VertexState {
module: shaders.blocks_and_lines.get(),
entry_point: "skybox_vertex",
entry_point: Some("skybox_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.blocks_and_lines.get(),
entry_point: "skybox_fragment",
entry_point: Some("skybox_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: fb.linear_scene_texture_format(),
Expand Down Expand Up @@ -315,13 +315,13 @@ impl Pipelines {
layout: Some(&lines_render_pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.blocks_and_lines.get(),
entry_point: "lines_vertex",
entry_point: Some("lines_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[WgpuLinesVertex::desc()],
},
fragment: Some(wgpu::FragmentState {
module: shaders.blocks_and_lines.get(),
entry_point: "lines_fragment",
entry_point: Some("lines_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: fb.linear_scene_texture_format(),
Expand Down Expand Up @@ -378,13 +378,13 @@ impl Pipelines {
),
vertex: wgpu::VertexState {
module: shaders.frame_copy.get(),
entry_point: "frame_copy_vertex",
entry_point: Some("frame_copy_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.frame_copy.get(),
entry_point: "frame_copy_fragment",
entry_point: Some("frame_copy_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: wgpu::TextureFormat::Rgba16Float,
Expand Down Expand Up @@ -459,13 +459,13 @@ impl Pipelines {
),
vertex: wgpu::VertexState {
module: shaders.rerun_copy.get(),
entry_point: "rerun_frame_copy_vertex",
entry_point: Some("rerun_frame_copy_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.rerun_copy.get(),
entry_point: "rerun_frame_copy_fragment",
entry_point: Some("rerun_frame_copy_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[
Some(wgpu::ColorTargetState {
Expand Down
6 changes: 3 additions & 3 deletions all-is-cubes-gpu/src/in_wgpu/postprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ pub(crate) fn create_postprocess_pipeline(
layout: Some(&pipeline_layout),
vertex: wgpu::VertexState {
module: shaders.postprocess.get(),
entry_point: "postprocess_vertex",
entry_point: Some("postprocess_vertex"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[],
},
fragment: Some(wgpu::FragmentState {
module: shaders.postprocess.get(),
entry_point: "postprocess_fragment",
entry_point: Some("postprocess_fragment"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: super::surface_view_format(surface_format),
Expand Down Expand Up @@ -194,7 +194,7 @@ pub(crate) fn postprocess<I: time::Instant>(
render_pass.set_pipeline(postprocess_render_pipeline);
render_pass.set_bind_group(
0,
ev.postprocess_bind_group.get_or_insert(
&*ev.postprocess_bind_group.get_or_insert(
(
ev.info_text_texture.view().unwrap().global_id(),
ev.fb.global_id(),
Expand Down
14 changes: 7 additions & 7 deletions all-is-cubes-gpu/src/in_wgpu/rerun_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ impl RerunImageExport {
let mut logged_camera = normal_camera.clone();
logged_camera.set_viewport(Viewport::with_scale(1.0, logged_size));

let Resources {
camera_buffer,
srgb_color_texture,
srgb_color_texture_view,
linear_depth_texture,
linear_depth_texture_view,
copy_bind_group,
let &mut Resources {
ref camera_buffer,
ref srgb_color_texture,
ref srgb_color_texture_view,
ref linear_depth_texture,
ref linear_depth_texture_view,
ref copy_bind_group,
} = self.resources.get_or_insert(
(fb.scene_for_postprocessing_input().global_id(), logged_size),
|| {
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes-gpu/src/in_wgpu/shader_testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ where
layout: Some(&pipelines.block_render_pipeline_layout),
vertex: wgpu::VertexState {
module: &shader,
entry_point: "block_vertex_main",
entry_point: Some("block_vertex_main"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
buffers: &[WgpuBlockVertex::desc(), WgpuInstanceData::desc()],
},
fragment: Some(wgpu::FragmentState {
module: &shader,
entry_point: "test_entry_point",
entry_point: Some("test_entry_point"),
compilation_options: wgpu::PipelineCompilationOptions::default(),
targets: &[Some(wgpu::ColorTargetState {
format: fbt.linear_scene_texture_format(),
Expand Down
Loading

0 comments on commit f63b163

Please sign in to comment.