mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
Fix issue with multiple queued mappings where the last one is not cancelled
This commit is contained in:
parent
ecbddedfaf
commit
2c153f5d50
@ -700,6 +700,12 @@ impl<B: GfxBackend> LifetimeTracker<B> {
|
||||
resource::BufferMapState::Waiting(pending_mapping) => pending_mapping,
|
||||
// Mapping cancelled
|
||||
resource::BufferMapState::Idle => continue,
|
||||
// Mapping queued at least twice by map -> unmap -> map
|
||||
// and was already successfully mapped below
|
||||
active @ resource::BufferMapState::Active { .. } => {
|
||||
buffer.map_state = active;
|
||||
continue;
|
||||
}
|
||||
_ => panic!("No pending mapping."),
|
||||
};
|
||||
let status = if mapping.range.start != mapping.range.end {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user