mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 22:50:19 +00:00
3290295a50
# Objective - Fixes #16122 When the wayland feature is not enabled, xwayland is used on wayland. Nvidia drivers are somewhat bugged on linux and return outdated surfaces on xwayland for seemingly no reason. Oftentimes at startup we get into an infine loop where the surface is permanently outdated and nothing (or sometimes only the first frame) is drawn on the screen. ## Solution After experimenting I found that we can safely call configure again and the issue seems to resolve itsef. After this change I couldn't reproduce the original issue after many tries. More testing is probably needed though. The main issue is that `get_current_texture` fails sometimes because the surface remains outdated even after configuring. It would be better to just properly handle and never panic when `get_current_texture` fails. This way we always call configure when outdated and bail when getting the swapchain fails instead of crashing. The number of special cases is also reduced. ## Testing I tested the example "rotation" manually by trying to move around. It works with X11 and Xwayland and the non panicing code paths didn't change so other platforms aren't affected. |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml | ||
README.md |