mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
c45ea6f5b1f8dc7a59cdc2f222f768be7a2e85f1
800: Schedule event waits after redraw events are cleared r=kvark a=kvark As @adamnemecek pointed out, our examples were busy waiting. I investigated a bit and figured that our `WaitScheduled` was always interrupted by `RedrawEventsCleared`. So scheduling the wait in it works. Tested on Linux and macOS. CPU time of the cube example drops from 100% to single-digit. Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Languages
Rust
78.5%
WGSL
13%
GLSL
3.1%
Metal
2.8%
HLSL
2.3%
Other
0.2%