From e00df5bf6bdd27af17f4a9766a67ff9619dc4ef6 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Fri, 10 Jul 2026 22:24:51 +0200 Subject: [PATCH] Bindings: Fix `_destroyBindings()`. (#34014) --- src/renderers/common/Bindings.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/renderers/common/Bindings.js b/src/renderers/common/Bindings.js index c57cb3b6383d7e..2b9c5923279ba8 100644 --- a/src/renderers/common/Bindings.js +++ b/src/renderers/common/Bindings.js @@ -271,10 +271,14 @@ class Bindings extends DataMap { this.backend.destroySampler( binding ); - } + } else if ( binding.texture !== null ) { + + // untrack destroyed bind group from its texture - const textureData = this.textures.get( binding.texture ); - if ( textureData.bindGroups !== undefined ) textureData.bindGroups.delete( bindGroup ); + const textureData = this.textures.get( binding.texture ); + if ( textureData.bindGroups !== undefined ) textureData.bindGroups.delete( bindGroup ); + + } binding.release();