Repository navigation
dri3: add an option to disable the Present wait-fence bridge - #105
Conversation
|
@KiralyCraft Could you please help test on your devices whether this PR affects the fix in PR #96? |
|
Of course, I don't have a wayland setup, but I can test on my current xorg-based setup. I'll give it a shot with wayland as well; |
Testing with Termux:X11 is fine. I mainly want to confirm whether this PR reintroduces previously fixed issues such as screen flickering in X11 applications or games. |
|
So I'm back. I tested So far, I have not reproduced the old OpenGL flickering in this test. The cube, horse, cat and moving-window scenes looked clean in the matched However, there is a substantial performance regression with
I found a Redmi Pad Pro in my drawer, the It seems that with your fix, the ordinary KGSL flush waits for GPU completion on the CPU, whereas with PR96 Mesa submits rendering and then gives back a fence to overlap GPU and CPU. I would not merge this yet, I'm studying this a bit more to see if I can come up with anything EDIT: I am now replicating your setup on the 710 device with proot. Hope it crashes! |
|
I managed to reproduce your freeze without this PR by using Anland’s KDE Plasma Wayland setup on my Adreno 710 device. The setup is:
With Keeping KWin and XWayland unchanged and switching only the client’s Mesa to this PR’s |
|
I found an issue in xwayland where it waits on a frame’s fence again after it has already copied the frame and told the application that the buffer is free to reuse. By then, the application may have reset that fence for its next frame, so xwayland ends up waiting for the wrong frame and can get stuck. Fixing this resolved the freeze on my Adreno 710 without any performance hit. I'll reference the PR for your xwayland repo here in a bit, putting things together now; |
|
Done! I also added the fix we pushed to Termux:X11 with the wait-fence retrigger. My advice here would be to not merge this PR (#105) but instead to test the PR for xwayland. If that works, then the current status of Mesa can stay as is, without any further changes |
Some Android/Xwayland combinations can hang on the first frame or show a black window when the native render-fence bridge introduced in PR #96 is enabled. Add MESA_DRI3_DISABLE_PRESENT_WAIT_FENCE to skip initialization of the XSync Present wait-fence bridge and use the existing flush path instead. The option defaults to false, preserving the current synchronization behavior unless explicitly disabled. This provides a per-process workaround while the underlying compatibility issue is investigated.
5f25a63 to
64b6273
Compare
Summary
Add
MESA_DRI3_DISABLE_PRESENT_WAIT_FENCEas an opt-in workaround for Android/Xwayland sessions affected by the Present wait-fence bridge introduced in PR #96.Change
Setting the following environment variable skips initialization of the XSync Present wait-fence bridge and uses the existing flush path:
The variable defaults to
false, so existing behavior is preserved unless the workaround is explicitly enabled.This PR only adds the fallback switch. It does not change swap-interval handling or claim to fix the underlying compatibility issue.