File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -162,9 +162,17 @@ class Bindings extends DataMap {
162162
163163 const bindings = this . nodes . getForCompute ( computeNode ) . bindings ;
164164
165- for ( const bindGroup of bindings ) {
165+ if ( this . backend . isWebGPUBackend ) {
166+
167+ for ( const bindGroup of bindings ) {
168+
169+ this . backend . deleteBindGroupData ( bindGroup ) ;
170+
171+ }
172+
173+ }
166174
167- this . backend . deleteBindingsData ( bindGroup ) ;
175+ for ( const bindGroup of bindings ) {
168176
169177 this . delete ( bindGroup ) ;
170178
@@ -181,9 +189,17 @@ class Bindings extends DataMap {
181189
182190 const bindings = renderObject . getBindings ( ) ;
183191
184- for ( const bindGroup of bindings ) {
192+ if ( this . backend . isWebGPUBackend ) {
193+
194+ for ( const bindGroup of bindings ) {
195+
196+ this . backend . deleteBindGroupData ( bindGroup ) ;
197+
198+ }
199+
200+ }
185201
186- this . backend . deleteBindingsData ( bindGroup ) ;
202+ for ( const bindGroup of bindings ) {
187203
188204 this . delete ( bindGroup ) ;
189205
Original file line number Diff line number Diff line change @@ -2126,7 +2126,7 @@ class WebGPUBackend extends Backend {
21262126 */
21272127 deleteBindingsData ( bindGroup ) {
21282128
2129- this . bindingsUtils . deleteBindingsData ( bindGroup ) ;
2129+ this . bindingsUtils . deleteBindGroupData ( bindGroup ) ;
21302130
21312131 }
21322132
Original file line number Diff line number Diff line change @@ -495,7 +495,7 @@ class WebGPUBindingUtils {
495495 *
496496 * @param {BindGroup } bindGroup - The bind group.
497497 */
498- deleteBindingsData ( bindGroup ) {
498+ deleteBindGroupData ( bindGroup ) {
499499
500500 const { backend } = this ;
501501
You can’t perform that action at this time.
0 commit comments