Bug 57054

Summary: [GM45 SNA] gtk3 tab rendering demonstrates error in opacity shader
Product: xorg Reporter: Edward Sheldrake <ejsheldrake>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: fturco
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
i915 platform: i915 features:
Description Flags
gtk+ 3 tabs with 2.20.13
Xorg log file none

Description Edward Sheldrake 2012-11-13 08:28:08 UTC
Created attachment 69986 [details]
gtk+ 3 tabs with 2.20.13

After upgrading from xf86-video-intel 2.20.12 to 2.20.13, tabs in GTK+ 3 programs like gedit look ugly, as if the anti-aliasing of the diagonal line has gone wrong somehow. See attached screenshot.

I tried "git bisect" which ended up with:

e1a63de8991a6586b83c06bcb3369208871cf43d is the first bad commit
commit e1a63de8991a6586b83c06bcb3369208871cf43d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Nov 2 09:10:32 2012 +0000

    sna/gen4+: Prefer GPU spans if the destination is active
    Trying to avoid using the inplace scanline rasteriser for large shapes.
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

However, the first revision tested during the bisecting had different corruption in GTK+ 3 tabs: the diagonal edges of the tabs looked bad (but not as thick as with 2.20.13, and there were some artifacts in the tabs themselves)

git bisect log:
git bisect start
# bad: [66eb0adffa63ef8ece7621ba90dc96af91549612] sna/dri: Apply the can_blit() check for CopyRegion
git bisect bad 66eb0adffa63ef8ece7621ba90dc96af91549612
# good: [7ff8b1ba543508f3b209f2ade7655c3aa34d546d] 2.20.12 release
git bisect good 7ff8b1ba543508f3b209f2ade7655c3aa34d546d
# bad: [e1a63de8991a6586b83c06bcb3369208871cf43d] sna/gen4+: Prefer GPU spans if the destination is active
git bisect bad e1a63de8991a6586b83c06bcb3369208871cf43d
# good: [1a489142c8e6a4828348cc9afbd0f430d3b1e2d8] sna: Disable RandR hotplug events if Xinerama is enabled
git bisect good 1a489142c8e6a4828348cc9afbd0f430d3b1e2d8
# good: [74c912880c302889f38fe5898c8038a0ba20e5db] sna: Fix a typo in a DBG
git bisect good 74c912880c302889f38fe5898c8038a0ba20e5db
# good: [b924831e445615b82a53b10e1849720e933eddfe] sna: Preserve mode if flushing before a scanline wait
git bisect good b924831e445615b82a53b10e1849720e933eddfe
# good: [72bcd8f85c98502b13a67d9c606371afe513584c] sna: Try to reduce ping-pong migration for intermixed render/legacy code paths
git bisect good 72bcd8f85c98502b13a67d9c606371afe513584c
Comment 1 Edward Sheldrake 2012-11-13 08:29:22 UTC
Created attachment 69987 [details]
Xorg log file
Comment 2 Chris Wilson 2012-11-13 09:10:02 UTC
The first question is what theme is that, that shows off the opacity error most clearly?
Comment 3 Chris Wilson 2012-11-13 09:14:38 UTC
Oh probably adwaita, my gm45 is in the comparative stone age!
Comment 4 Edward Sheldrake 2012-11-13 09:40:46 UTC
Yes it's adwaita, gtk+ 3.6.2, gnome-themes-standard 3.6.2 (was the same with 3.6.1), running under openbox 3.5.
Comment 5 Chris Wilson 2012-11-13 11:31:47 UTC
Hmm, actually needed to revert it for another reason:

commit b6d2bb961517623d46aa6944307cb998ee125459
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Nov 13 10:05:56 2012 +0000

    sna/gen4: Do not prefer inplace non-rectilinear spans
    As gen4 requires the per-rectangle vertex flush, emitting spans on the
    GPU is inefficient and so we prefer to composite the mask instead.
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

But the root cause is still present - something inside the opacity shader for gm45 is broken.
Comment 6 Chris Wilson 2012-11-13 12:23:59 UTC
Retitling to indicate that the regression is now gone, but the underlying issue remains.
Comment 7 Chris Wilson 2012-11-13 12:51:36 UTC
commit d2897cb0136ffec83365c7530ed544b562cac478
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Nov 13 12:43:44 2012 +0000

    sna/gen4,5: Fix the opacity shader to use the right vertex attribute
    Reported-by: Edward Sheldrake <ejsheldrake@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57054
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 8 Chris Wilson 2012-11-25 19:02:42 UTC
*** Bug 57524 has been marked as a duplicate of this bug. ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.