From be8c7e6ced06d3d7868a91ccfa51de9ec8d8dc39 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Tue, 13 Feb 2024 15:47:56 -0500 Subject: [PATCH] fix(gles): discard cmd. enc. buf. on drop --- wgpu-hal/src/gles/command.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wgpu-hal/src/gles/command.rs b/wgpu-hal/src/gles/command.rs index 08083894c3..42c1f0ce51 100644 --- a/wgpu-hal/src/gles/command.rs +++ b/wgpu-hal/src/gles/command.rs @@ -93,6 +93,13 @@ impl super::CommandBuffer { } } +impl Drop for super::CommandEncoder { + fn drop(&mut self) { + use crate::CommandEncoder; + unsafe { self.discard_encoding() } + } +} + impl super::CommandEncoder { fn rebind_stencil_func(&mut self) { fn make(s: &super::StencilSide, face: u32) -> C {