draw: fix line stippling with aa lines
authorRoland Scheidegger <sroland@vmware.com>
Tue, 6 Mar 2018 20:33:16 +0000 (21:33 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Wed, 7 Mar 2018 20:29:00 +0000 (21:29 +0100)
commit8ba3750d3d953a9e6a2a0564e2d3d5efc42316e1
tree596164a7f2dfeb23c3567abcee1cb5327b4479eb
parentdbb2cf388b79538ed572ecb3b8b3b5cb1f8fab0e
draw: fix line stippling with aa lines

In contrast to non-aa, where stippling is based on either dx or dy
(depending on if it's a x or y major line), stippling is based on
actual distance with smooth lines, so adjust for this.

(It looks like there's some minor artifacts with mesa demos
line-sample and stippling, it looks like the line endpoints
aren't quite right with aa + stippling - maybe due to the
integer math in the stipple stage, but I can't quite pinpoint it.)

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/draw/draw_pipe_stipple.c