Skip to content
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

WebGPUBackend: Simplify Timestamp Queries and Ensure Work Done #29970

Merged

Conversation

RenaudRohlinger
Copy link
Collaborator

Related issue: #29857 #29940

Description

This PR removes the patch introduced in #29857, as the underlying issue is specific to WebGPU and will be resolved through gpuweb/gpuweb#4941.

The logic has been streamlined by leveraging mapState and ensuring all pending work is completed using await this.device.queue.onSubmittedWorkDone(); (seems to be necessary as compute shading resolves too quickly).

This contribution is funded by Utsubo

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.14
78.99
339.14
78.99
+0 B
+0 B
WebGPU 483.51
134.22
483
134.08
-514 B
-140 B
WebGPU Nodes 482.98
134.13
482.46
133.98
-514 B
-145 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 464.62
111.98
464.62
111.98
+0 B
+0 B
WebGPU 552.64
149.58
552.12
149.43
-514 B
-151 B
WebGPU Nodes 508.52
139.29
508
139.14
-514 B
-149 B

@RenaudRohlinger RenaudRohlinger merged commit 96e5149 into mrdoob:dev Nov 26, 2024
12 checks passed
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