mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
Warn when binding a buffer that is still mapped
This commit is contained in:
1 parent
6b0751f1f8
commit
e7005548c0
1 file changed
+1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user