-
Notifications
You must be signed in to change notification settings - Fork 927
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
feature: Timestamp queries #3636
Conversation
For the other backends, can't we just implement in terms of other existing operations on the command encoder? |
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.
super cool PR, looking forward to this. Maybe tomorrow I get finally to picking up the flag there if @FL33TW00D doesn't have more in the pipe already?
Haven't gotten to actually looking at the actual Metal code yet :(.
Sadly the spec moved already on a bit, so things are supposed to look a lil bit different now, put comments at the key place so it's easy to find.
otherwise also on the todo list belong
- update comments on TIMESTAMP_QUERY feature
- implement (i.e. forward things in) web.rs version
@Wumpf Really appreciate you looking through this, I left it as is due to the release of Chrome 113 being a higher priority. The metal PR is here: gfx-rs/metal-rs#265 There is still a problem with the counter sample buffer not being kept alive long enough. |
@FL33TW00D I copied your branch over to this fork and continued from there - did the move over the (simpler!) WebGPU spec update so far. |
…n on timestamp periods generally
78e7896
to
9680a18
Compare
…ntation for metal
got everything up to date and address review comments but there is some work left to do after adding the tests:
hoping to get to these at some point this week |
the whole "don't copy uninitialized query slots" is a huge rabbit hole. After trying a couple of things I decided do adjourn this, for details see #3993 |
2dca7d4
to
00f0095
Compare
All green now again!
|
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.
This is positively amazing work. Short of a couple nits, this is good to land.
CI is fail due to taiki-e/install-action#178 |
Checklist
cargo clippy
.RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown
if applicable.Connections
https://github.com/gfx-rs/wgpu/pull/2528/files
gpuweb/gpuweb#1325
gpuweb/gpuweb#2046
gfx-rs/metal-rs#263
Description
This is a WIP implementation of timestamp queries for compute/render passes. Only implemented for Metal and compute for now.
TODO
metal-rs
here.ComputePassDescriptor
andRenderPassDescriptor
.Testing
Modified
hello-compute
andhello-triangle
and successfully recorded the execution time. Only tested on M1 so far.