33 GPUSamplerBindingType
44} from './WebGPUConstants.js' ;
55
6- import { FloatType , IntType , NotEqualStencilFunc , UnsignedIntType } from '../../../constants.js' ;
6+ import { FloatType , IntType , UnsignedIntType } from '../../../constants.js' ;
77import { NodeAccess } from '../../../nodes/core/constants.js' ;
88import { error } from '../../../utils.js' ;
99
@@ -20,22 +20,24 @@ class BindGroupLayout {
2020 */
2121 constructor ( layoutGPU ) {
2222
23+ /**
24+ * The current GPUBindGroupLayout
25+ *
26+ * @type {GPUBindGroupLayout }
27+ */
2328 this . layoutGPU = layoutGPU ;
2429
2530 /**
26- * The number of bind groups that use this.layoutGPU
31+ * The number of bind groups that use the current GPUBindGroupLayout
2732 *
28- * @type {Map<string, GPUBindGroupLayout> }
33+ * @type {number }
2934 */
3035 this . usedTimes = 0 ;
3136
3237 }
3338
3439}
3540
36-
37-
38-
3941/**
4042 * A WebGPU backend utility module for managing bindings.
4143 *
@@ -65,7 +67,7 @@ class WebGPUBindingUtils {
6567 /**
6668 * A cache that maps combinations of layout entries to existing bind group layouts.
6769 *
68- * @type {Map<string, GPUBindGroupLayout > }
70+ * @type {Map<string, BindGroupLayout > }
6971 */
7072 this . bindGroupLayoutCache = new Map ( ) ;
7173
@@ -83,7 +85,7 @@ class WebGPUBindingUtils {
8385 const backend = this . backend ;
8486
8587 const bindingGPU = {
86- binding : index ++ ,
88+ binding : index ,
8789 visibility : binding . visibility
8890 } ;
8991
@@ -568,7 +570,6 @@ class WebGPUBindingUtils {
568570
569571 // Decrement the layout reference's usedTimes attribute
570572 bindingsData . layout . usedTimes -- ;
571- console . log ( bindingsData . layout . usedTimes ) ;
572573
573574 // Remove reference from map
574575 if ( bindingsData . layout . usedTimes === 0 ) {
0 commit comments