Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 26, 2025

Related issue: #31751

Description

I was still experiencing warnings with the WebGPU backend in some occasions. After more debugging, I found out that caching bind groups (which is only done for WebGPU) must not be allowed if binding.generation was set to true. In this case a new GPU texture has been created which must be reflected in the bind group.

@github-actions
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.91
79.11
338.91
79.11
+0 B
+0 B
WebGPU 578.22
159.27
578.23
159.27
+5 B
+1 B
WebGPU Nodes 576.83
159.03
576.83
159.03
+5 B
+1 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 470.78
113.9
470.78
113.9
+0 B
+0 B
WebGPU 648.76
175.3
648.76
175.3
+5 B
-1 B
WebGPU Nodes 602.85
164.42
602.86
164.43
+5 B
+4 B

@Mugen87 Mugen87 changed the title Bindings: Fix caching of bindings. Bindings: Fix caching of texture bindings. Aug 26, 2025
@Mugen87 Mugen87 added this to the r180 milestone Aug 26, 2025
@sunag sunag merged commit a480a68 into mrdoob:dev Aug 26, 2025
9 checks passed

needsBindingsUpdate = true;

cacheBindings = false;
Copy link
Collaborator Author

@Mugen87 Mugen87 Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunag BTW: The new generation flag was super helpful to identify/isolate this use case!

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.

2 participants