Bug 89650 - dEQP-GLES3: incorrect wide line rasterization after clipping
Summary: dEQP-GLES3: incorrect wide line rasterization after clipping
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-18 08:28 UTC by Iago Toral
Modified: 2016-03-26 09:43 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Iago Toral 2015-03-18 08:28:21 UTC
Affected tests:

dEQP-GLES3.functional.rasterization.primitives.line_strip_wide
dEQP-GLES3.functional.rasterization.primitives.line_loop_wide

In these cases it looks like one of the edges of a line is outside the viewport (right end of the viewport). The hardware seems to clip using the rightmost edge of the line as reference, but this means that the leftmost side is clipped before it should according to dEQP.

Enabling the guardand test in gen7 fixes this, but a comment in the code suggests that we should not do this to prevent rendering to the underlying surface outside the viewport region (gen8 hw fixes this apparently), so if the guardband is not disabled for this case in gen8 this may be fixed for gen8+.

The OpenGL spec is not clear as to how clipping should work with wide lines, but it suggests that for xmajor lines, columns of pixels should be rendered, and that is not what is happening here (but that section does not consider clipping to any extent). Some texts seem to suggest that OpenGL expects wide lines to be rendered as multiple width=1 lines. If this is the case, then deqp is right and intel rendering is bogus (intel renders a paralelogram), but nothing in the OpenGL spec seems to make this clear. I think clipping with wide lines is not clearly specified.

So this might be a bogus tests or incorrect. We had some discussion on this topic in the mailing list:
http://lists.freedesktop.org/archives/mesa-dev/2015-February/076072.html

Although I don't think there is a clear conclusion I believe that the spirit of the spec is the one represented by dEQP expectations.
Comment 1 Kenneth Graunke 2016-03-26 09:43:25 UTC
Should be fixed by

commit 88d28aa4d9edec33ef7bcf1f56b77fbb756a24f8
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Mar 10 14:36:25 2016 -0800

    i965: Stop XY clipping point and line primitives.

commit 0de64ab7881cc4d343fecf8a2b5b9b9ca7b34416
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Mar 10 15:30:36 2016 -0800

    i965: Scissor to the viewport when rendering points/lines.

commit d000a4989f66921832a33742ea07fa191393231b
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Mar 10 16:04:01 2016 -0800

    i965: Include the viewport in the scissor rectangle.

(I missed this bug and re-filed it as 94453...)


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.