Wgpu22 seems to be 23% slower than wgpu 0.20 on my render-bench. #6425
Replies: 3 comments
-
Got Tracy working. Had two versions of the Tracy crate. Now using Tracy Profiler 0.11.1, the latest. That's now in both branches of render-bench mentioned above, so others can reproduce this. Most time is going into "Node: pbr shadow rendering S0", which is Rend3's shadow computation. Seems to be slower than it was with WGPU 0.20, but I don't know why yet. There are no profiling scopes below that level, and I probably have to add some. So, more later. Is there a WGPU regression test to make sure it doesn't get slower in new releases? (The shadow system is brute-force, comparing all lights with all objects on every frame. I know that has to be improved. But right now I just have a sun, so it wasn't intolerable in WGPU 0.20) |
Beta Was this translation helpful? Give feedback.
-
More info: Note lack of red bars at top. All frames have consistent time. For this part of the run, render-bench is just refreshing the screen, with no changes. Note red bars at top. Those are slow frames. They're intermittent. This is a source of jank in a simple situation that should be jank-free. VkQueuePresentKHR seems to have an intermittent lock stall. That's in wgpu/wgpu-hal/src/vulkan/mod.rs near line 1259. Nothing jumps out at me in "Blame" |
Beta Was this translation helpful? Give feedback.
-
This doesn't explain the whole problem. Frame times overall increased from 27ms to 32ms on this benchmark. No one cause stands out yet. Complied on same machine with same Rust versions. Rend3 was updated to use WGPU22 from WGPU 20, with the necessary upgrades made for winit, egui, and glam. |
Beta Was this translation helpful? Give feedback.
-
Wgpu22 seems to be 23% slower than wgpu 0.20 on my render-bench.
Build and run https://github.com/John-Nagle/render-bench/ branches "hp" vs "wgpu22safe". The second one uses WGPU 22, and all the more recent crates it requires. When you run the program, it prints frame time stats. Every 10 seconds, it adds or deletes a large number of objects. Look at average time after adding objects. Oh, and make the graphics window full screen, if it's not.
If you build with "--features tracy", Tracy profiling will be enabled. Use Tracy Profiler 0.10.0 to read. Shadow processing is using about 67% of time, which is excessive but may not be WGPU's fault.
That feature doesn't seem to enable Tracy profiling within WGPU itself, so more granular information is not available right now. Does WGPU support Tracy? I don't see a Cargo feature for that.
Beta Was this translation helpful? Give feedback.
All reactions