From 754d93a4a77ce62453b658da5224273dc9e9996d 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 926122e4ad..4385e2a31e 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 {