From 754b4658188af7e55889186e601576e83bf9a022 Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Thu, 16 Apr 2020 11:35:03 +0200 Subject: [PATCH] Warn when binding a buffer that is still mapped --- wgpu-core/src/device/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index a485df6f99..ec324d8885 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -1466,6 +1466,7 @@ impl Global { } 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);