mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Warn when binding a buffer that is still mapped
This commit is contained in:
committed by
Dzmitry Malyshau
parent
88710e899d
commit
754b465818
@@ -1466,6 +1466,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
}
|
||||
if !buffer_guard[id].life_guard.use_at(submit_index) {
|
||||
if let resource::BufferMapState::Active = buffer_guard[id].map_state {
|
||||
log::warn!("Dropped buffer has a pending mapping.");
|
||||
unmap_buffer(&device.raw, &mut buffer_guard[id]);
|
||||
}
|
||||
device.temp_suspected.buffers.push(id);
|
||||
|
||||
Reference in New Issue
Block a user