Skip to content

WebGPURenderer: Fix storage buffer binding update and 4 bytes alignment#30529

Merged
sunag merged 2 commits intomrdoob:devfrom
RenaudRohlinger:utsubo/fix/storage-attribute-update
Feb 15, 2025
Merged

WebGPURenderer: Fix storage buffer binding update and 4 bytes alignment#30529
sunag merged 2 commits intomrdoob:devfrom
RenaudRohlinger:utsubo/fix/storage-attribute-update

Conversation

@RenaudRohlinger
Copy link
Copy Markdown
Collaborator

Description

Currently, updating the value of a storage buffer does not reflect the changes in the compute program.

Additionally, if the storage buffer is of size 3, the 4-byte alignment applied during attribute initialization is not accounted for in the update method, resulting in corrupted values.

This contribution is funded by Utsubo

@RenaudRohlinger RenaudRohlinger added this to the r174 milestone Feb 15, 2025
@github-actions
Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.36
78.33
336.36
78.33
+0 B
+0 B
WebGPU 518.03
143.8
518.34
143.87
+306 B
+68 B
WebGPU Nodes 517.5
143.69
517.81
143.75
+306 B
+67 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.35
112.17
465.35
112.17
+0 B
+0 B
WebGPU 589.91
159.77
590.22
159.83
+306 B
+66 B
WebGPU Nodes 545.27
149.23
545.58
149.3
+306 B
+65 B

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