Avoid freeze when interacting with menus on Wayland by re-aquiring next swapchain image after updating swapchain - #79143
Conversation
…xt swapchain image after updating swapchain
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Sorry for before. I wrote a huge wall of text speculating why this would work when I forgot that I could try on my new shiny desktop wayland setup with xwayland and all bells and whistles.
I can replicate the bug on the aforementioned shiny wayland setup, which is very similar to the one there (arch linux, RDNA2, mesa vulkan radeon) and i confirm that this PR fixes the issue.
As I expected, the branch never gets called (tested with a print_line right after the condition, before free(presentModes);). I think that this fix is somehow related to the fact that we never break from the loop, not the opposite as expected.
That said, this is pretty high priority so I'd merge in the meantime as it indeed fixes the issue.
IMO further investigation is warranted (I can help if you want).
Edit: Rereading the original reasoning behind the patch I might've misunderstood as usual. If the idea was exactly to account for the fact that we never get any null extents in this case... I'm sorry, this stuff is complicated and lately I'm really getting tangled in it.
|
Thanks! |
|
Cherry-picked for 4.1.1. |
Avoid freeze when interacting with menus on Wayland by re-aquiring next swapchain image after updating swapchain
Avoid freeze when interacting with menus on Wayland by re-aquiring next swapchain image after updating swapchain
Fixes: #78487
Fixes: #75752
Tested on Windows and Linux (X11), this change does not reintroduce #77790
I am a little uncertain about this change. I am confident that it is minimal and should not cause any problems. But I am unsure if there is an even better fix for the issue. Wayland behaves differently from every other windowing system here, and since I am not running Wayland, it is very difficult to figure out how to make Wayland happy