From 5694ca0a6e377ebffd6c6dda2b68514c3842946d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 11:14:45 +0000 Subject: [PATCH 1/2] chore(deps): update wgpu requirement from 29 to 30 Updates the requirements on [wgpu](https://github.com/gfx-rs/wgpu) to permit the latest version. - [Release notes](https://github.com/gfx-rs/wgpu/releases) - [Changelog](https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md) - [Commits](https://github.com/gfx-rs/wgpu/compare/wgpu-v29.0.1...v30.0.0) --- updated-dependencies: - dependency-name: wgpu dependency-version: 30.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- crates/render/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/render/Cargo.toml b/crates/render/Cargo.toml index 91a28058..2bc6ea3c 100644 --- a/crates/render/Cargo.toml +++ b/crates/render/Cargo.toml @@ -23,7 +23,7 @@ bytemuck = {version = "1", features = ["derive"]} image = {version = "0.25", default-features = false, features = ["png"]} pollster = "0.4" thiserror.workspace = true -wgpu = "29" +wgpu = "30" # Window/interaction (feature = "window"). winit 0.30 and wgpu 29 both use # raw-window-handle 0.6, so an `Arc` satisfies wgpu's surface handle From 7f9ecc97ab809a97798b788e9eecc9230c7a1698 Mon Sep 17 00:00:00 2001 From: Andy Aragon Date: Mon, 13 Jul 2026 07:52:29 -0700 Subject: [PATCH 2/2] fix(render): migrate to wgpu 30 API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wgpu 30 introduces breaking changes that the 29→30 bump surfaced in brepkit-render: - RequestAdapterOptions gained `apply_limit_buckets` (limit bucketing). - VertexState `buffers` entries are now `Option`. - SurfaceConfiguration gained `color_space` (SurfaceColorSpace::Auto). - BufferView `get_mapped_range` now returns a Result. - Presentation moved from SurfaceTexture::present to Queue::present. --- crates/render/src/compute_mesh.rs | 4 ++-- crates/render/src/pipeline.rs | 16 +++++++++++----- crates/render/src/viewer.rs | 3 ++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/crates/render/src/compute_mesh.rs b/crates/render/src/compute_mesh.rs index 362cb60f..9553f8c6 100644 --- a/crates/render/src/compute_mesh.rs +++ b/crates/render/src/compute_mesh.rs @@ -793,7 +793,7 @@ fn build_draw_resources( vertex: wgpu::VertexState { module: &shader, entry_point: Some("vs_main"), - buffers: &[wgpu::VertexBufferLayout { + buffers: &[Some(wgpu::VertexBufferLayout { array_stride: 28, // 7 words: pos(3) + normal(3) + face_id(1) step_mode: wgpu::VertexStepMode::Vertex, attributes: &[ @@ -813,7 +813,7 @@ fn build_draw_resources( shader_location: 2, }, ], - }], + })], compilation_options: wgpu::PipelineCompilationOptions::default(), }, primitive: wgpu::PrimitiveState { diff --git a/crates/render/src/pipeline.rs b/crates/render/src/pipeline.rs index 10ce5ae3..de4637ae 100644 --- a/crates/render/src/pipeline.rs +++ b/crates/render/src/pipeline.rs @@ -67,6 +67,7 @@ fn candidate_adapters( power_preference: wgpu::PowerPreference::HighPerformance, force_fallback_adapter: false, compatible_surface: surface, + apply_limit_buckets: false, })) { out.push(adapter); @@ -76,6 +77,7 @@ fn candidate_adapters( power_preference: wgpu::PowerPreference::LowPower, force_fallback_adapter: true, compatible_surface: surface, + apply_limit_buckets: false, })) { out.push(adapter); @@ -260,7 +262,7 @@ impl Pipelines { vertex: wgpu::VertexState { module: &mesh_shader, entry_point: Some("vs_main"), - buffers: &[wgpu::VertexBufferLayout { + buffers: &[Some(wgpu::VertexBufferLayout { array_stride: std::mem::size_of::() as wgpu::BufferAddress, step_mode: wgpu::VertexStepMode::Vertex, attributes: &[ @@ -280,7 +282,7 @@ impl Pipelines { shader_location: 2, }, ], - }], + })], compilation_options: wgpu::PipelineCompilationOptions::default(), }, primitive: wgpu::PrimitiveState { @@ -330,7 +332,7 @@ impl Pipelines { vertex: wgpu::VertexState { module: &edge_shader, entry_point: Some("vs_main"), - buffers: &[wgpu::VertexBufferLayout { + buffers: &[Some(wgpu::VertexBufferLayout { array_stride: std::mem::size_of::() as wgpu::BufferAddress, step_mode: wgpu::VertexStepMode::Vertex, attributes: &[wgpu::VertexAttribute { @@ -338,7 +340,7 @@ impl Pipelines { offset: 0, shader_location: 0, }], - }], + })], compilation_options: wgpu::PipelineCompilationOptions::default(), }, primitive: wgpu::PrimitiveState { @@ -713,7 +715,11 @@ pub fn map_and_read(device: &wgpu::Device, buffer: &wgpu::Buffer) -> Result return Err(RenderError::BufferMap(e.to_string())), Err(e) => return Err(RenderError::BufferMap(e.to_string())), } - let data = buffer.slice(..).get_mapped_range().to_vec(); + let data = buffer + .slice(..) + .get_mapped_range() + .map_err(|e| RenderError::BufferMap(e.to_string()))? + .to_vec(); buffer.unmap(); Ok(data) } diff --git a/crates/render/src/viewer.rs b/crates/render/src/viewer.rs index e4b904a9..7e257f81 100644 --- a/crates/render/src/viewer.rs +++ b/crates/render/src/viewer.rs @@ -450,6 +450,7 @@ impl ViewerApp { let config = wgpu::SurfaceConfiguration { usage: wgpu::TextureUsages::RENDER_ATTACHMENT, format, + color_space: wgpu::SurfaceColorSpace::Auto, width, height, // Fifo (vsync) is guaranteed supported by the WebGPU spec; prefer it @@ -550,7 +551,7 @@ impl ViewerApp { ); gpu.queue.submit(Some(encoder.finish())); gpu.window.pre_present_notify(); - frame.present(); + gpu.queue.present(frame); } /// Render the id buffer for the current camera and read the face id under