[Mesa-dev] [Bug 94193] [llvmpipe] Line antialiasing looks different when GL_LINE_STIPPLE is enabled with pattern 0xffff

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 17 20:59:47 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=94193

--- Comment #3 from Brian Paul <brianp at vmware.com> ---
(In reply to Roland Scheidegger from comment #2)
> So if I understand this right, there's really two issues here:
> 1) smooth lines don't quite work when line stippling is enabled
> 2) we don't optimize fake-enabled line stippling away
> 
> As for 2), this is something the state tracker could do. I don't know if
> that's worth it?

I actually recently looked at that myself but disabling line stipple if the
pattern is 0xffff would potentially violate a GL invariance rule.  It would
depend on the driver/GPU.

The deal is GL allows stippled lines with pattern = 0xffff to hit different
pixels than the same line drawn with stippling disabled.  But with pattern =
0xffff you should be guaranteed to hit the same pixels as two complementary
patterns such as 0xff00 and 0x00ff.  

In fact, GL allows quite a few "no-op" states (such as blend GL_ONE/GL_ZERO,
glAlphaFunc(GL_ALWAYS), etc) which seem useless but are included for invariance
purposes.

I don't know if anyone would depend on this particular line stipple behaviour
in practice though.


> I think we generally only optimize for stupid gl state
> settings like this if there's actually apps out there which really do these
> stupid things. So, are there such real apps?

Oh, yes! :)  A CAD app I was working on a few months ago draws many lines with
stippling enabled with pattern 0xffff.  But I think it was just sloppiness and
not invariance-driven.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160217/22a51852/attachment.html>


More information about the mesa-dev mailing list