Skip to content

Commit f35cf94

Browse files
WumpfDerSchmaleRedMindZkpreid
authored
Release 25.0.2 (#7723)
Co-authored-by: David Lenaerts <[email protected]> Co-authored-by: RedMindZ <[email protected]> Co-authored-by: Kevin Reid <[email protected]> fix(webgpu): Insert fragment constants into fragment descriptor instead of vertex (#7621) (#7722) Fixed a deadlock caused by locking the device's snatchable lock **after** locking the queue's pending writes (#7582) Fix `raw-window-handle` dependency being too lenient (#7526)
1 parent 060a779 commit f35cf94

File tree

8 files changed

+44
-16
lines changed

8 files changed

+44
-16
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ Bottom level categories:
4040

4141
## Unreleased
4242

43+
## v25.0.2 (2025-05-24)
44+
45+
### Bug Fixes
46+
47+
#### General
48+
49+
- Fix a possible deadlock within `Queue::write_buffer`. By @RedMindZ in [#7582](https://github.com/gfx-rs/wgpu/pull/7582)
50+
- Fix `raw-window-handle` dependency being too lenient. By @kpreid in [#7526](https://github.com/gfx-rs/wgpu/pull/7526)
51+
52+
#### WebGPU
53+
54+
- Insert fragment pipeline constants into fragment descriptor instead of vertex descriptor. By @DerSchmale in [#7621](https://github.com/gfx-rs/wgpu/pull/7621)
55+
4356
## v25.0.1 (2025-04-11)
4457

4558
### Bug Fixes
@@ -376,6 +389,16 @@ By @cwfitzgerald in [#6811](https://github.com/gfx-rs/wgpu/pull/6811), [#6815](h
376389

377390
- Call `pre_present_notify()` before presenting. By @kjarosh in [#7074](https://github.com/gfx-rs/wgpu/pull/7074).
378391

392+
## v24.0.5 (2025-05-24)
393+
394+
### Bug Fixes
395+
396+
#### General
397+
- Fix a possible deadlock within `Queue::write_buffer`. By @RedMindZ in [#7582](https://github.com/gfx-rs/wgpu/pull/7582)
398+
399+
#### WebGPU
400+
- Insert fragment pipeline constants into fragment descriptor instead of vertex descriptor. By @DerSchmale in [#7621](https://github.com/gfx-rs/wgpu/pull/7621)
401+
379402
## v24.0.4 (2025-04-03)
380403

381404
### Metal

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ png = "0.17.16"
138138
pollster = "0.4"
139139
portable-atomic = "1"
140140
profiling = { version = "1", default-features = false }
141-
raw-window-handle = { version = "0.6", default-features = false }
141+
raw-window-handle = { version = "0.6.2", default-features = false }
142142
rayon = "1"
143143
renderdoc-sys = "1.1.0"
144144
ron = "0.9"

wgpu-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wgpu-core"
3-
version = "25.0.1"
3+
version = "25.0.2"
44
authors = ["gfx-rs developers"]
55
edition = "2021"
66
description = "Core implementation logic of wgpu, the cross-platform, safe, pure-rust graphics API"

wgpu-core/src/device/queue.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ impl Queue {
476476
return Ok(());
477477
};
478478

479+
let snatch_guard = self.device.snatchable_lock.read();
480+
479481
// Platform validation requires that the staging buffer always be
480482
// freed, even if an error occurs. All paths from here must call
481483
// `device.pending_writes.consume`.
@@ -489,6 +491,7 @@ impl Queue {
489491
};
490492

491493
let result = self.write_staging_buffer_impl(
494+
&snatch_guard,
492495
&mut pending_writes,
493496
&staging_buffer,
494497
buffer,
@@ -522,6 +525,7 @@ impl Queue {
522525

523526
let buffer = buffer.get()?;
524527

528+
let snatch_guard = self.device.snatchable_lock.read();
525529
let mut pending_writes = self.pending_writes.lock();
526530

527531
// At this point, we have taken ownership of the staging_buffer from the
@@ -531,6 +535,7 @@ impl Queue {
531535
let staging_buffer = staging_buffer.flush();
532536

533537
let result = self.write_staging_buffer_impl(
538+
&snatch_guard,
534539
&mut pending_writes,
535540
&staging_buffer,
536541
buffer,
@@ -583,6 +588,7 @@ impl Queue {
583588

584589
fn write_staging_buffer_impl(
585590
&self,
591+
snatch_guard: &SnatchGuard,
586592
pending_writes: &mut PendingWrites,
587593
staging_buffer: &FlushedStagingBuffer,
588594
buffer: Arc<Buffer>,
@@ -595,8 +601,7 @@ impl Queue {
595601
.set_single(&buffer, wgt::BufferUses::COPY_DST)
596602
};
597603

598-
let snatch_guard = self.device.snatchable_lock.read();
599-
let dst_raw = buffer.try_raw(&snatch_guard)?;
604+
let dst_raw = buffer.try_raw(snatch_guard)?;
600605

601606
self.same_device_as(buffer.as_ref())?;
602607

@@ -614,7 +619,7 @@ impl Queue {
614619
to: wgt::BufferUses::COPY_SRC,
615620
},
616621
})
617-
.chain(transition.map(|pending| pending.into_hal(&buffer, &snatch_guard)))
622+
.chain(transition.map(|pending| pending.into_hal(&buffer, snatch_guard)))
618623
.collect::<Vec<_>>();
619624
let encoder = pending_writes.activate();
620625
unsafe {

wgpu-hal/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wgpu-hal"
3-
version = "25.0.1"
3+
version = "25.0.2"
44
authors = ["gfx-rs developers"]
55
edition = "2021"
66
description = "Hardware abstraction layer for wgpu, the cross-platform, safe, pure-rust graphics API"

wgpu/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wgpu"
3-
version.workspace = true
3+
version = "25.0.2"
44
authors.workspace = true
55
edition.workspace = true
66
description = "Cross-platform, safe, pure-rust graphics API"

wgpu/src/backend/webgpu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2130,7 +2130,7 @@ impl dispatch::DeviceInterface for WebDevice {
21302130
.collect::<js_sys::Array>();
21312131
let module = frag.module.inner.as_webgpu();
21322132
let mapped_fragment_desc = webgpu_sys::GpuFragmentState::new(&module.module, &targets);
2133-
insert_constants_map(&mapped_vertex_state, frag.compilation_options.constants);
2133+
insert_constants_map(&mapped_fragment_desc, frag.compilation_options.constants);
21342134
if let Some(ep) = frag.entry_point {
21352135
mapped_fragment_desc.set_entry_point(ep);
21362136
}

0 commit comments

Comments
 (0)