From 940f81768cc32f0b692795112f2fb41429279df6 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Wed, 5 Oct 2022 18:02:32 -0700 Subject: [PATCH] When a command encoder is dropped, destroy its hal command buffer. 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 a582f6733f..716fce54e1 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -4575,6 +4575,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); } }