Bug 9951 - GL_LINE_SMOOTH and GL_POLYGON_SMOOTH with i965 driver
Summary: GL_LINE_SMOOTH and GL_POLYGON_SMOOTH with i965 driver
Status: RESOLVED DUPLICATE of bug 28832
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium enhancement
Assignee: marius predut
QA Contact:
: 15006 (view as bug list)
Depends on:
Reported: 2007-02-11 18:11 UTC by Gary Wong
Modified: 2015-05-06 12:46 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:

Test case demonstrating GL_LINE_SMOOTH with narrow lines (648 bytes, text/plain)
2007-02-11 18:17 UTC, Gary Wong

Description Gary Wong 2007-02-11 18:11:02 UTC
I'd like to improve the i965 driver's handling of GL_LINE_SMOOTH and GL_POLYGON_SMOOTH.  (A comment in brw_draw.c indicates that lines are "non-conformant"; polygons are not handled at all.)  However, without any hardware documentation, I don't even know if the 965 is capable of doing any better than the driver currently exposes (let alone how).

I see that the i810 driver seems to attempt polygon antialiasing (i810RasterPrimitive, in i810tris.c), so if the i810 hardware implements it then it seems possible the i965 does as well.  Also, a comment in the i180 Enable(LINE_SMOOTH) handler implies that smoothed lines can disappear if the line width is not increased (and I can match this behaviour with the i965 driver, so perhaps there is a related solution).

I'd appreciate help from anybody more familiar with the i965 hardware:

a) can the 965 rasteriser do correctly smoothed lines and polygons?
b) what is the precise behaviour of the registers listed in brw_sf_unit_state
   in brw_structs.h? (and any others which are relevant)

Thanks very much!
Comment 1 Gary Wong 2007-02-11 18:17:18 UTC
Created attachment 8675 [details]
Test case demonstrating GL_LINE_SMOOTH with narrow lines

It seems that narrow lines parallel to the x- or y-axis are not drawn when GL_LINE_SMOOTH is enabled.  This code should draw three line segments, but only two (the diagonal ones) appear.  Increasing the glLineWidth parameter to 1.5 or more makes the third line appear again.

The GL_LINE_SMOOTH comment in i810Enable (src/mesa/drivers/dri/i180/i810state.c) seems potentially related to this behaviour, though that might be a coincidence.
Comment 2 Michael Fu 2007-08-27 17:47:05 UTC
re-assign to nanhai zou
Comment 3 Zou Nan hai 2008-03-24 19:36:48 UTC
*** Bug 15006 has been marked as a duplicate of this bug. ***
Comment 4 Adam Jackson 2009-08-24 12:25:48 UTC
Mass version move, cvs -> git
Comment 5 Eric Anholt 2011-06-17 17:05:09 UTC
closing this one to point to bug #28832 -- I think it's a more complete concrete testcase for line smoothing.  The hw docs have since been released with all the information we have about smoothing.  And, note that polygon smoothing doesn't exist in the hardware (it was not a terribly useful feature even back in the day, so it hasn't been implemented since the 830)

*** This bug has been marked as a duplicate of bug 28832 ***
Comment 6 marius predut 2015-05-06 12:45:54 UTC
The patch series that fix this bug are upstream

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.