-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
100% CPU usage since the update to wgpu 0.20 #5092
Comments
I did some bisecting and the offending wgpu PR seems to be gfx-rs/wgpu#4967. |
egui is already on wgpu 22.0, so unless there is reason to believe this is fixed on wgpu main (which pr fixes it?) this is completely unrelated |
Switching to wgpu trunk does not fix it yet unfortunately. |
@jleibs I can try to repro this locally |
For what it's worth, this is not related to egui directly. I can also reproduce it with the wgpu boids example, i.e. with |
I can also repro this on Arch w/ 560.35.03. I am running through Wayland. On wayland native I don't see the issue, but I do when using @EmbersArc can you confirm you're running X11 native and not wayland+xwayland? |
On wayland, the boids example runs at 4400 fps using 30% CPU. |
Yes this is on X11 native. |
Howdy, wgpu maintainer here. We really will need a bit more information on the performance usage here. Would it be possible to take a performance profile to understand where the cpu is spending its time? Vulkan swapchain sync is mildly cursed, so even after the rewrite we may be still doing it subtly wrong. |
@jleibs and me will dive a bit deeper into this either this or next week (we work at the same company and while I'm not as knowledgeable as @cwfitzgerald in this area, I know a few things about wgpu from being a maintainer myself 😄, making this easier) |
Also because I happened to turn on the other computer I'll note that I also see this on:
So, it does not appear unique to the more recent 560-series drivers. |
Apparently the validation layer has some interaction with this as well, we should make sure that we try release versions and debug versions with disabled validation, see |
Describe the bug
Any egui app uses 100% CPU when redrawing since commit 814ad07, the wgpu 0.20 update.
To Reproduce
Steps to reproduce the behavior:
cargo run --bin hello_world
Expected behavior
Only a fraction of the CPU usage as observed before the wgpu update.
Screenshots
Desktop
The text was updated successfully, but these errors were encountered: