Bug 28832 - piglit/general/line-aa-width fail
Summary: piglit/general/line-aa-width fail
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: marius predut
QA Contact:
URL:
Whiteboard:
Keywords:
: 9951 27007 60797 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-29 19:36 UTC by Gordon Jin
Modified: 2015-10-22 12:06 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch (3.16 KB, patch)
2014-03-14 07:47 UTC, Samuel Iglesias Gonsálvez
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Jin 2010-06-29 19:36:31 UTC
piglit/tests/general/line-aa-width has been fail since Eric added it on June 15th:
http://cgit.freedesktop.org/piglit/commit/?id=6e3195bcb51a3d32b0d3fdc31b5c16732f751c2b

On i965:
Line from 0,2-30,3 had bad thickness:
min coverage: 0.137255
avg coverage: 0.800302
max coverage: 1.000000
Line from 30,3-60,6 had bad thickness:
min coverage: 0.407843
avg coverage: 0.834389
max coverage: 1.000000
PIGLIT: {'result': 'fail' }

On i915:
Output:
Line from 0,2-30,3 had bad thickness:
min coverage: 0.062745
avg coverage: 0.555354
max coverage: 1.000000
Line from 30,3-60,6 had bad thickness:
min coverage: 0.125490
avg coverage: 0.552941
max coverage: 1.000000
Line from 60,6-90,12 had bad thickness:
min coverage: 0.250980
avg coverage: 0.596229
max coverage: 1.000000
Line from 90,12-120,20 had bad thickness:
min coverage: 0.313726
avg coverage: 0.637104
max coverage: 1.000000
Comment 1 Eric Anholt 2010-07-11 22:08:00 UTC
I've played with this test a lot trying to fix it with no luck.  We've had bug reports of bad rendering in real apps from this, but it appears to be hard to get a good result out of the AA line support in the HW.
Comment 2 Eric Anholt 2010-07-21 23:02:20 UTC
WIP changes that don't actually fix the problem:

http://cgit.freedesktop.org/~anholt/mesa/log/?h=i965-line-aa
Comment 3 Eric Anholt 2010-07-21 23:02:54 UTC
*** Bug 27007 has been marked as a duplicate of this bug. ***
Comment 4 Eric Anholt 2011-06-17 17:05:09 UTC
*** Bug 9951 has been marked as a duplicate of this bug. ***
Comment 5 Samuel Iglesias Gonsálvez 2014-03-14 07:47:37 UTC
Created attachment 95780 [details] [review]
Patch

Thanks to previous work by Eric Anholt, I have been playing with line width to fix this bug.

The patch increases the line width by 0.25f when GL_LINE_SMOOTH is enabled, making the HW AA algorithm to give better results without increasing a lot the line width.

This patch also fixes bug 60797.

It has been tested on SandyBridge and IvyBridge.
Comment 6 Samuel Iglesias Gonsálvez 2014-03-17 09:59:08 UTC
*** Bug 60797 has been marked as a duplicate of this bug. ***
Comment 7 Stefan Huber 2014-03-23 21:48:59 UTC
(In reply to comment #5)
I have tested the patch on my Lenovo X220 with Sandybridge graphics. Horizontal and vertical lines stop to disappear, but yellow lines are depicted very dark yellow-ish. From my point of view, the patch improves the situation, but does not solve it.
Comment 8 Kenneth Graunke 2014-12-19 20:53:42 UTC
The Windows driver generally works a lot better for line rendering.  It would be great if someone at Intel could figure out how they map the GL API settings to the hardware settings, and make Mesa do the same thing.
Comment 9 marius predut 2015-03-31 10:16:27 UTC
2 patches for IVB ad SNB was send to  the mesa mailing list.

Setting a Line Width of 0.0 specifies the rasterization of the “thinnest” (one-pixel-wide), non-antialiased lines. Lines rendered with zero Line Width are rasterized using GIQ (Grid Intersection Quantization) rules as specified by the GDI and Direct3D APIs. For more digging ,see bspec section 6.3.12.1 Zero-Width (Cosmetic) Line Rasterization.
Comment 10 marius predut 2015-05-06 12:39:36 UTC
The patches that fix this bug is up-streamed
Comment 11 lu hua 2015-05-08 05:53:09 UTC
It has been fixed on i965 platforms.
On i915 platforms, it fails with mesa master and 10.5 branch. Report bug 90367 to track it.
Close this bug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.