From 0c05dbf5c98937d52c8e1b99aebb5d2310a5ff63 Mon Sep 17 00:00:00 2001 From: atlv Date: Tue, 24 Jun 2025 09:12:47 -0400 Subject: [PATCH] fix(webgpu): set_unclipped_depth (#7841) --- CHANGELOG.md | 4 ++++ wgpu/src/backend/webgpu.rs | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ac793f78..c8bfb2496 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,6 +92,10 @@ Bottom level categories: - Remove extraneous main thread warning in `fn surface_capabilities()`. By @jamesordner in [#7692](https://github.com/gfx-rs/wgpu/pull/7692) +#### WebGPU + +- Fix setting unclipped_depth. By @atlv24 in [#7841](https://github.com/gfx-rs/wgpu/pull/7841) + ### Changes - Loosen Viewport validation requirements to match the [new specs](https://github.com/gpuweb/gpuweb/pull/5025). By @ebbdrop in [#7564](https://github.com/gfx-rs/wgpu/pull/7564) diff --git a/wgpu/src/backend/webgpu.rs b/wgpu/src/backend/webgpu.rs index 12662e7c0..a6ff408ae 100644 --- a/wgpu/src/backend/webgpu.rs +++ b/wgpu/src/backend/webgpu.rs @@ -380,8 +380,7 @@ fn map_primitive_state(primitive: &wgt::PrimitiveState) -> webgpu_sys::GpuPrimit PrimitiveTopology::TriangleStrip => pt::TriangleStrip, }); - //TODO: - //mapped.unclipped_depth(primitive.unclipped_depth); + mapped.set_unclipped_depth(primitive.unclipped_depth); match primitive.polygon_mode { wgt::PolygonMode::Fill => {}