mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 14:01:08 +01:00
Fix deadlock between snatchable_lock and trackers in Queue::write_texture (#7004)
* Fix deadlock between snatchable_lock and trackers in Queue::write_texture * Fix another deadlock in write_texture between pending_writes and snatchable_lock. # Conflicts: # CHANGELOG.md
This commit is contained in:
1 parent
f6a4834c07
commit
9bb65cdad4
2 files changed
+8
-3
No files matched your search
@@ -40,6 +40,11 @@ Bottom level categories:
|
||||
|
||||
## Unreleased
|
||||
|
||||
### v24.0.2 (2025-02-??)
|
||||
|
||||
#### Bug Fixes
|
||||
- Fix a possible deadlock within `Queue::write_texture`. By @metamuffin in [#7004](https://github.com/gfx-rs/wgpu/pull/7004)
|
||||
|
||||
### v24.0.1 (2025-01-22)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
@@ -697,6 +697,8 @@ impl Queue {
|
||||
.map_err(TransferError::from)?;
|
||||
}
|
||||
|
||||
let snatch_guard = self.device.snatchable_lock.read();
|
||||
|
||||
let mut pending_writes = self.pending_writes.lock();
|
||||
let encoder = pending_writes.activate();
|
||||
|
||||
@@ -732,7 +734,7 @@ impl Queue {
|
||||
&mut trackers.textures,
|
||||
&self.device.alignments,
|
||||
self.device.zero_buffer.as_ref(),
|
||||
&self.device.snatchable_lock.read(),
|
||||
&snatch_guard,
|
||||
)
|
||||
.map_err(QueueWriteError::from)?;
|
||||
}
|
||||
@@ -742,8 +744,6 @@ impl Queue {
|
||||
}
|
||||
}
|
||||
|
||||
let snatch_guard = self.device.snatchable_lock.read();
|
||||
|
||||
let dst_raw = dst.try_raw(&snatch_guard)?;
|
||||
|
||||
let (block_width, block_height) = dst.desc.format.block_dimensions();
|
||||
|
||||
Reference in new issue
Block a user