-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Window resizing lags with white rectangles on Windows #5374
Comments
I just tested the |
Also, GL backend works just fine even on Windows, the issue persists only on Vulkan and DX12 backends |
Made an interesting observation. These are not white rectangles, it looks like a white surface the size of a window that appears in it before the wgpu's surface is rendered. Initially, when the window appears, it is completely filled with white, and only then the image is drawn there. As you make the window smaller, there is a delay in reducing the white surface size, causing it to become visible. However, having decreased once, it does not increase back when the window size increases, and due to this, during subsequent resizes, the lagging part is transparent (if the window has transparency enabled) or black (if not) I have attached a video illustrating this behavior 2024-03-10_20-20-19.mp4 |
It happens to me as well, and it's pretty noticable. Found it as I was trying to make an iced app and the window resizing was very slow and laggy, even in release. Then found out the wgpu examples had the same issue. 6VfvMMJZhw.mp4(the video is running the example in debug but release still does much the same, just slightly less) I also get tons of errors in the console:
(second line spams as I resize) Am on windows 11. |
I think this might be related DXGI swap chains and the Windows DWM. We have had a lot of issues with this but not clean solution. There is a long (very long) rant/write up on resizing behavior here https://stackoverflow.com/questions/53000291/how-to-smooth-ugly-jitter-flicker-jumping-when-resizing-windows-especially-drag. The author is not very happy and goes into some rants, but he has done some solid research into the problem. |
I found an article written by Raph Levien about this very problem: |
@cwfitzgerald Sorry for late reply, I somehow missed notification. Just tried your branch on |
Description
When resizing a window on Windows, strange white rectangles underneath it become visible (example in the video in the extra materials). The problem is present with both Vulkan and DX12 backends. Also, I tested the same code on an M1 Mac and it doesn't have this issue. So I think this may be specific to Windows.
Repro steps
Despite the fact that the video was recorded on my project, the issue is present even when running unchanged examples from the wgpu repository, for instance,
hello_triangle
.Extra materials
2024-03-10.17-51-12.mp4
Platform
The text was updated successfully, but these errors were encountered: