-
Notifications
You must be signed in to change notification settings - Fork 916
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
Vulkan sometimes present while unfinished #4919
Comments
It's most likely not fixable in wgpu, as I couldn't reproduce it on my AMD iGPU, and Nvidia GPU. There is also no error reported when enabling validation layers. It might be also solved by using semaphores instead of fences for presenting, as the fences sometimes just get ignored |
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPresentModeKHR.html specifies which presentation modes can result in tearing and which cannot. These map to https://docs.rs/wgpu/0.18.0/wgpu/enum.PresentMode.html, which also mentions which can have tearing. Looks like the examples are all using
I don't think validation layers catch everything, and incorrect use of Vulkan may work on some drivers but not others. Though driver bugs are definitely a possibility too. |
I assume its also a driver bug, or some race condition when creating the fence, as most of the times the fence just works fine, and its also only occuring in release mode, not debug. But its definitely not tearing because the frame is not finished and already presented, which is the opposite of tearing. |
Wait does this only happen on the water example? |
Got it also reproduced in the mipmap example, but its barely visible, the fps just jumped from 2000fps to 2800fps. |
Unfortunately I didn't got it reproduced on trunk, as I switched to Linux (and only have a clean install of Windows); you can probably close this issue. |
Description
Sometimes, during the configuration of the surface, at start or when resizing, the frames get presented even though they are still written to, which leads to flickering.
The frame rate also increases from 1200 FPS to 2000 FPS which lead me to this conclusion.
Repro steps
Run wgpu water example in release mode with Vulkan backend.
Expected vs observed behavior
The rendering finishes before presenting, even though shouldn't there be triple buffering?
Extra materials
https://github.com/gfx-rs/wgpu/assets/32491319/ca41f826-d735-43ee-9d72-cd90935930b1
(epilepsy warning)
Platform
Latest commit of wgpu
79e51692
, Windows 11 Build 22631, AMD Radeon RX6900 XT, with latest drivers 23.11.1The text was updated successfully, but these errors were encountered: