ngl renderer performance issues on Adreno 506
Steps to reproduce
- Install postmarketOS with phosh on a device with Adreno 506, for example Xiaomi Mi A1 (tissot) or Mi A2 Lite (daisy)
- Run any GTK4 application, for example gtk4-demo or gnome-control-center
- Notice the disappointing performance
Current behavior
Performance with the ngl renderer is lower than it was with the old gl renderer.
In gtk4-demo, the "scrolling icons" and "scrolling text with emoji" demonstrate the most severe slowdowns, only reaching ~10fps where the old gl renderer can consistently go above 30fps.
In gnome-control-center, scrolling the main list is janky; opening a section or closing it to return to the main page results in a slow, choppy animation. Similar performance issues can be experienced when e.g. navigating the preferences for epiphany. Everywhere (gnome-text-editor, kxg and so on) opening popups via the hamburger menu takes longer than it should.
Not as easy to reproduce consistently as the above, but I've experienced several crashes in applications such as gnome-software and epiphany when I had the ngl renderer enable, and zero since switching to the old gl renderer.
Expected outcome
Animations are reasonably smooth and performance is roughly on par with the old renderer.
Version information
GTK 4.14.1 on postmarketOS edge (rolling release) with phosh
Additional information
Setting GSK_RENDERER=gl
in the environment before launching the GTK application results in much improved performance.
The original discussion, in the context of adding a workaround to postmarketOS, can be found here: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4961
I realize that this is kind of a broad bug report, and that GTK developers likely don't have access to the hardware needed to reproduce it. Please let me know if there's any way I can help narrow this down. I'll happily run whatever diagnostics you can think of (within reason).