GNOME Bugzilla – Bug 724788
stage-cogl: Fix buffer_age code path
Last modified: 2015-03-09 14:27:09 UTC
When I wrote that code back then I have been testing with the NVIDIA drivers (there where the only ones to support it) and never noticed that it was broken because their implementation was broken. They have released a fixed driver[1] that has an entry in the changelog: "Fixed a bug in the GLX_EXT_buffer_age extension where incorrect ages would be returned unless triple buffering was enabled." I am currently adding support to mesa (dri3 finally allows us to do that), and noticed some graphical corruption even though the reported age is correct. Also people are now seeing corruption when running gnome-shell with the newer driver[2]. The attached patch should fix that (and also don't pointlessly union a rectangle with itself). 1: http://www.nvidia.com/Download/driverResults.aspx/73100/en-us 2: https://devtalk.nvidia.com/default/topic/690704/linux/-334-16-parts-of-the-ui-randomly-flicker-when-moving-the-mouse/
Created attachment 269784 [details] [review] stage-cogl: Fix buffer_age code path Currently we where checking whether the damage_history list contains more or equal then buffer_age entries. This is wrong because we prepend our current clip to the list just before the check. Fix that to check whether we have more entries instead of more or equal.
Review of attachment 269784 [details] [review]: looks good to me, with one minor nitpick. if you could fix it before pushing it, it would be great. ::: clutter/cogl/clutter-stage-cogl.c @@ +488,3 @@ int i = 0; GSList *tmp = NULL; + for (tmp = stage_cogl->damage_history->next; tmp; tmp = tmp->next) it would be nice to have a comment, here, before the for() loop.
Attachment 269784 [details] pushed as 2639395 - stage-cogl: Fix buffer_age code path
Hi, it seems that the bug was not corrected entirely on clutter 1.16.4, see: https://bbs.archlinux.org/viewtopic.php?id=178024&p=3 https://bugs.archlinux.org/task/39371?project=1&cat[0]=2&string=clutter
(In reply to comment #4) > Hi, it seems that the bug was not corrected entirely on clutter 1.16.4, unsurprisingly, since Adel's patch was cherry-picked after the 1.16.4 release. it'll be in a 1.16.6 release, once I have time to spin it.
Hello! I am using Clutter 1.18.0-1 (archlinux) and the problem persists. The most annoying manifestations are in scrolling gnome-terminal (shift+pg up/pg down), changing tabs in firefox and typing in text areas. I'm using kernel linux 3.14.1-1 and driver nvidia 334.21-4.
(In reply to comment #6) > Hello! I am using Clutter 1.18.0-1 (archlinux) and the problem persists. The > most annoying manifestations are in scrolling gnome-terminal (shift+pg up/pg > down), changing tabs in firefox and typing in text areas. I'm using kernel > linux 3.14.1-1 and driver nvidia 334.21-4. This sounds like a different unrelated bug. Sounds like there are problems between x rendering and gl rendering synchronization. We should use x11_sync_object to fix that but no one has worked on any such patches. Feel free to open a new bug (against mutter) but it has nothing to do with this one.