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

WebGPURenderer: Handle OutOfMemory in Timestamp Tracking #29857

Merged

Conversation

RenaudRohlinger
Copy link
Collaborator

@RenaudRohlinger RenaudRohlinger commented Nov 11, 2024

Description

Add fallback for GPUOutOfMemoryError via device.pushErrorScope( 'out-of-memory' ) when creating timestamp query set. This prevents renderer breakage caused by failed sample buffer allocation.
Also added an error message suggesting users close other GPU-intensive tabs to enable timestamp measurements as it's in most case the issue triggering the error.

Before (crashing the renderer):
image

After (handle error, nothing breaks):
image

This contribution is funded by Utsubo

Copy link

github-actions bot commented Nov 11, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.22
79.04
339.22
79.04
+0 B
+0 B
WebGPU 476.9
132.19
477.43
132.37
+532 B
+182 B
WebGPU Nodes 476.2
132.01
476.73
132.2
+532 B
+189 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 464.67
111.99
464.67
111.99
+0 B
+0 B
WebGPU 545.93
147.86
546.47
148.04
+532 B
+181 B
WebGPU Nodes 501.81
137.56
502.35
137.74
+532 B
+182 B

@RenaudRohlinger RenaudRohlinger added this to the r171 milestone Nov 11, 2024
@RenaudRohlinger RenaudRohlinger merged commit a328c69 into mrdoob:dev Nov 11, 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.

1 participant