-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
renderer_vulkan: fix deadlock when resizing the SDL window #1860
renderer_vulkan: fix deadlock when resizing the SDL window #1860
Conversation
eabfe13
to
ee2b4b4
Compare
@JetPackAndButlers @C0rn3j Please help me test this. |
quickly tested on arch+cinnamon desktop environment, could freely resize sdl window, game (Bloodborne main menu and in game) kept running responsively |
I can resize fine on master on Arch Linux with Plasma, did not test this branch (no time atm for that too) EDIT: Eventually after STOPPING resizing it died after a couple seconds and crashed, so I guess the bug happens there too - again, NOT with this branch, but on master, so this comment is not that useful. |
I don't know why but 2D games like |
1857eed
to
54d71cf
Compare
Latest pushes work when abusing resizing window now. 2024-12-25.10-32-17.mp4 |
54d71cf
to
814f6aa
Compare
Rebase. |
814f6aa
to
9d10564
Compare
This fixes the blackscreen issue for me, which #1830 didn't. I'm running Hyprland on Arch Linux, with an AMD RX 7900 XTX (RADV driver; mesa 24.3.1), and compared this branch with the latest git main. |
It's a bit of a shame that the patch kills responsivity, but at least it's better than crashing |
It because of XWayland/NVidia combos. When use native Wayland or when not using NVidia GPU, swapchain recreation (which is slow) is not happened at all. 2024-12-26.00-35-50.mp4 |
Ahhh, I think get it now.
The fact that if DISPLAY is set it defaults to Xwayland is imo another bug, I'll report that separately... #1878 * my resize is fully responsive on Arch Linux with Wayland Plasma on Nvidia while running the game under Xwayland on latest master + this patch. Screencast_20241225_191129.webm |
Resize is fully responsive on Wayland while choppier on X11 (Nvidia issue as mentioned previously), Bloodborne seems to handle the resize flawlessly on both menu and gameplay, same with GrimGrimoire OnceMore, 13 Sentinels and Persona 3-4 Dancing, Odin Sphere and Dragon's Crown Pro after some resizing seem to freeze while throwing
or
|
@JetPackAndButlers What is your PC specs? |
It slow on mine because my PC is a optimus laptop with hybrid graphics so my DE run on the Intel integrated GPU. |
Launching with Fullscreen doesn't result in a blackscreen anymore. -On Fedora/Bazzite with an AMD GPU and open source drivers. |
i7 9700k, RTX 2070 and 16 Gigabytes of Ram |
So will this go into the mainbuild? because it seems like it fixes the stuff. |
9d10564
to
122fe22
Compare
Close by accident. |
Please retest. Try to abuse window resizing. @JetPackAndButlers Please retest if device lost still happen in your case. |
Still works for me, on Hyprland (Wayland, keeping the |
50e4f7d
to
5c23a8e
Compare
@raphaelthegreat I think the current code is in good shape. Can I request a review? |
…mu#1860) * renderer_vulkan: Fix deadlock when resizing the SDL window * Address review comment
Commit 400da1a add ability to handle recreation of the swapchain which fix black screen under XWayland. Unfortunately, that commit doesn't account for rapid swapchain recreation caused by resizing window.
This commit aim to solve that issue by skipping frames to recreate the swapchain and delay resetting the frame's present done fence until after we know for sure we will be submitting work with it.