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!
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.
re-assign to nanhai zou
*** Bug 15006 has been marked as a duplicate of this bug. ***
Mass version move, cvs -> git
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 ***
The patch series that fix this bug are upstream