mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-26 00:33:51 +00:00
Warn when binding a buffer that is still mapped
This commit is contained in:
parent
6b0751f1f8
commit
e7005548c0
@ -1461,6 +1461,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);
|
||||
|
Loading…
Reference in New Issue
Block a user