-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Description
Wgpu22 seems to be 23% slower than wgpu 0.20 on my render-bench.
Repro steps
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. Build with
cargo build --release --features tracy
Start up Tracy Profiler 0.11.1 and click "Connect". It will then wait for the traced program to start.
./target/release/render-bench
Run for about a minute, with the graphics window on top and full screen, then close the graphics window.
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.
Expected vs observed behavior
Frames average about 23% slower with WGPU 22.
There is almost no variation in frame time with WGPU 0.20, but there are slow frames a few times per second with WGPU 22. So there's a jank problem. All frames are slower, as well.
At least part of the problem is an intermittent lock stall in VkQueuePresentKHR. This is not the dominant user of time but seems to be responsible for the jank problem.
Note that this is a benchmark test, so that the developers can see this problem in a clean situation. My real program, the Sharpview metaverse viewer, has these problems, and they're much worse there. Occasional frames as slow as 200ms. So bad that WGPU 22 is unusable. Sharpview has a lot more going on in other threads than this benchmark, which only has two threads, one of which is idle except when it changes the scene every 10 seconds.
That's in wgpu/wgpu-hal/src/vulkan/mod.rs near line 1259. Nothing jumps out at me in "Blame"
Extra materials
Tracing results follow in updates.
Platform
Linux 22.04 LTS. NVidia 3070.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status