When the draw module splits long line loops, the sections are emitted
as line strips.  But the primitive type wasn't set correctly so each
section was being drawn as a loop, introducing extra line segments.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81174
---
 src/gallium/auxiliary/draw/draw_pt_vsplit.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pt_vsplit.c 
b/src/gallium/auxiliary/draw/draw_pt_vsplit.c
index 8d448f9..02f7e71 100644
--- a/src/gallium/auxiliary/draw/draw_pt_vsplit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_vsplit.c
@@ -256,8 +256,11 @@ static void vsplit_prepare(struct draw_pt_front_end 
*frontend,
       break;
    }
 
-   /* split only */
-   vsplit->prim = in_prim;
+   /* Line loops get split into line strips. Other types stay as-is. */
+   if (in_prim == PIPE_PRIM_LINE_LOOP)
+      vsplit->prim = PIPE_PRIM_LINE_STRIP;
+   else
+      vsplit->prim = in_prim;
 
    vsplit->middle = middle;
    middle->prepare(middle, vsplit->prim, opt, &vsplit->max_vertices);
-- 
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to