-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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: Add timestamp queries support in WebGPU #27597
Conversation
I think we could standardize async functions like I think we can get users used to using the suffix at first even if /cc @Mugen87 |
Make sense. Everything is now get render() {
return this.renderAsync;
} /cc @sunag |
@@ -90,6 +90,8 @@ class Backend { | |||
|
|||
// utils | |||
|
|||
resolveTimeStampAsync( renderContext, type ) { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be Timestamp
instead of TimeStamp
for consistency? /ping @RenaudRohlinger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! 👍
This PR add support for timestamp queries to monitor WebGPU performances. (Requires Chrome 121)
In my opinion this feature should be included OOTB in the Renderer, it will be really useful to compare WebGPU vs WebGL performances and is optional (disabled by default). I will add WebGL fallback via
EXT_disjoint_timer_query_webgl2
in a second time.The monitoring of performances can be enable with:
new WebGPURenderer( { trackTimestamp: true } );
Also improved the info system and honored all render calls to be async as they should (
render()
is async).honor async render and move to renderer await functions
Live demo:
https://raw.githack.com/renaudrohlinger/three.js/timestamp-queries/examples/webgpu_compute_particles.html
This contribution is funded by Utsubo