File tree Expand file tree Collapse file tree 5 files changed +203
-130
lines changed Expand file tree Collapse file tree 5 files changed +203
-130
lines changed Original file line number Diff line number Diff line change @@ -725,6 +725,14 @@ class Backend {
725725
726726 }
727727
728+ /**
729+ * Delete GPU data associated with a bind group.
730+ *
731+ * @abstract
732+ * @param {BindGroup } bindGroup - The bind group.
733+ */
734+ deleteBindGroupData ( /*bindGroup*/ ) { }
735+
728736 /**
729737 * Deletes an object from the internal data structure.
730738 *
Original file line number Diff line number Diff line change @@ -162,18 +162,9 @@ class Bindings extends DataMap {
162162
163163 const bindings = this . nodes . getForCompute ( computeNode ) . bindings ;
164164
165- if ( this . backend . isWebGPUBackend ) {
166-
167- for ( const bindGroup of bindings ) {
168-
169- this . backend . deleteBindGroupData ( bindGroup ) ;
170-
171- }
172-
173- }
174-
175165 for ( const bindGroup of bindings ) {
176166
167+ this . backend . deleteBindGroupData ( bindGroup ) ;
177168 this . delete ( bindGroup ) ;
178169
179170 }
@@ -189,18 +180,9 @@ class Bindings extends DataMap {
189180
190181 const bindings = renderObject . getBindings ( ) ;
191182
192- if ( this . backend . isWebGPUBackend ) {
193-
194- for ( const bindGroup of bindings ) {
195-
196- this . backend . deleteBindGroupData ( bindGroup ) ;
197-
198- }
199-
200- }
201-
202183 for ( const bindGroup of bindings ) {
203184
185+ this . backend . deleteBindGroupData ( bindGroup ) ;
204186 this . delete ( bindGroup ) ;
205187
206188 }
Original file line number Diff line number Diff line change @@ -1652,7 +1652,11 @@ class WebGPUBackend extends Backend {
16521652
16531653 data [ 0 ] = i ;
16541654
1655- const bindGroupIndex = this . bindingUtils . createBindGroupIndex ( data , bindingsData . layout ) ;
1655+ const { layoutGPU } = bindingsData . layout ;
1656+
1657+ console . log ( layoutGPU ) ;
1658+
1659+ const bindGroupIndex = this . bindingUtils . createBindGroupIndex ( data , layoutGPU ) ;
16561660
16571661 indexesGPU . push ( bindGroupIndex ) ;
16581662
You can’t perform that action at this time.
0 commit comments