Skip to content

WebGPUBindingUtils - Change bindGroupLayout cache system #31682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

cmhhelgeson
Copy link
Contributor

@cmhhelgeson cmhhelgeson commented Aug 19, 2025

Description

Testing alternate caching system for bindGroupLayouts.

webgpu_materials_toon only creates 4 bind group layouts.

Problem with the PR thus far is that entries still has to be created for each bindGroup even though many of the bindings and bindGroups are nearly identical.

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.91
79.1
338.91
79.1
+0 B
+0 B
WebGPU 575.55
158.81
575.79
158.87
+232 B
+60 B
WebGPU Nodes 574.16
158.56
574.39
158.62
+232 B
+60 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 470.7
113.91
470.7
113.91
+0 B
+0 B
WebGPU 646.61
174.86
646.84
174.91
+232 B
+53 B
WebGPU Nodes 600.79
164.04
601.02
164.1
+232 B
+57 B


} else if ( backend.compatibilityMode ) {
const backend = this.backend;
const device = backend.device;

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable device.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant