From c781971792ceb5a69c3cdbfcbf0935a6f763de49 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 6 Oct 2022 01:06:55 -0700 Subject: [PATCH] When a command encoder is dropped, destroy its hal command buffer. (#3069) Fixes #2965. --- 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 a88d99cbca..c906e9b44a 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -4574,6 +4574,7 @@ impl Global { if let Some(cmdbuf) = cmdbuf { let device = &mut device_guard[cmdbuf.device_id.value]; device.untrack::(hub, &cmdbuf.trackers, &mut token); + device.destroy_command_buffer(cmdbuf); } }