Skip to content

TSL - WorkgroupInfoNode -> ScopedVariableNode - #34295

Open
cmhhelgeson wants to merge 6 commits into
mrdoob:devfrom
cmhhelgeson:cmh/improve_workgroup_info
Open

TSL - WorkgroupInfoNode -> ScopedVariableNode#34295
cmhhelgeson wants to merge 6 commits into
mrdoob:devfrom
cmhhelgeson:cmh/improve_workgroup_info

Conversation

@cmhhelgeson

Copy link
Copy Markdown
Contributor

Description

Turn WorkgroupInfoNode into ScopedVariableNode. This PR allow us to

  1. Create workgroup address-spacevariables that are not arrays.
  2. Manually declare private address-space variables even when the builder.allowGlobalVariables is false.

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
Core 388.49
101.98
388.49
101.98
+0 B
+0 B
WebGL 372.46
87.93
372.46
87.93
+0 B
+0 B
WebGPU 703.52
193.93
703.88
194.04
+363 B
+110 B
WebGPU Nodes 701.51
193.63
701.87
193.73
+363 B
+103 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 515.87
124.88
515.87
124.88
+0 B
+0 B
WebGPU 761.32
204.48
761.89
204.68
+570 B
+198 B
WebGPU Nodes 709.98
191.75
710.55
191.96
+570 B
+211 B

@sunag

sunag commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Do you have an example to demonstrate the issue?

@cmhhelgeson

cmhhelgeson commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Do you have an example to demonstrate the issue?

No, and there is no 'isssue' as of yet, this PR is mostly based out of a desire to translate the single pass prefix sum example seen here: https://github.com/b0nes164/Decoupled-Fallback-Paper/blob/main/artifact/Dawn/Shaders/csdldf.wgsl and referenced in this issue: #34256 (comment). The referenced shader uses workgroup variables, and currently, only workgroup arrays are supported.

@cmhhelgeson
cmhhelgeson force-pushed the cmh/improve_workgroup_info branch from 377a7cd to c10ab8d Compare August 28, 2026 20:17
@@ -0,0 +1,132 @@
import { error, warn } from '../../utils.js';
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.

3 participants