Skip to content

Commit 66e3e33

Browse files
committed
cleanup
1 parent 1b33b9e commit 66e3e33

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/renderers/webgpu/WebGPUBackend.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,8 +1654,6 @@ class WebGPUBackend extends Backend {
16541654

16551655
const { layoutGPU } = bindingsData.layout;
16561656

1657-
console.log( layoutGPU );
1658-
16591657
const bindGroupIndex = this.bindingUtils.createBindGroupIndex( data, layoutGPU );
16601658

16611659
indexesGPU.push( bindGroupIndex );
@@ -2130,7 +2128,7 @@ class WebGPUBackend extends Backend {
21302128
*/
21312129
deleteBindGroupData( bindGroup ) {
21322130

2133-
this.bindingsUtils.deleteBindGroupData( bindGroup );
2131+
this.bindingUtils.deleteBindGroupData( bindGroup );
21342132

21352133
}
21362134

src/renderers/webgpu/utils/WebGPUBindingUtils.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

@@ -626,7 +628,6 @@ class WebGPUBindingUtils {
626628

627629
// Decrement the layout reference's usedTimes attribute
628630
bindingsData.layout.usedTimes --;
629-
console.log( bindingsData.layout.usedTimes );
630631

631632
// Remove reference from map
632633
if ( bindingsData.layout.usedTimes === 0 ) {

0 commit comments

Comments
 (0)