From e7005548c0954c2dddacb5a3ec2fb74abcece7e5 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 93dcea7153..8b08e7d46d 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -1461,6 +1461,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);