Description
I am strictly a hobbyist when it comes to graphics programming, so please forgive any misinformed assumptions that I make :)
I am trying to benchmark individual render passes in an application built on wgpu-rs
. In my research to resolve this, I stumbled upon the "timestamp"
GPUQueryType
. This API seems like it exposes data which could be used to benchmark any particular command, render passes among them (a very useful feature indeed!).
However, I could not find any APIs for interfacing with these Queries in wgpu-rs
. I followed the trail and it seems that gfx-hal
does provide this interface, which (in theory) means it can be propagated to my application code with the only necessary changes being contained within wgpu-rs
and wgpu-core
. I have two theories as to why this feature is not already implemented:
- Software projects must allocate their limited resources judiciously; profiling isn't very useful if there is nothing to profile!
- This open issue on
gfx-hal
precludes it from being spec-compliant with WebGPU, namely this restriction:
Timestamp query requires
timestamp-query
is available on the device.
I am willing to put in some legwork to make this happen, but I want to make sure my understanding of the situation is correct before I invest too much time. Any guidance would also be appreciated. Thanks for working on wgpu-rs
!