draw: initialize prim header flags when clipping lines
authorRoland Scheidegger <sroland@vmware.com>
Thu, 7 Jan 2016 18:38:15 +0000 (19:38 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 7 Jan 2016 23:34:13 +0000 (00:34 +0100)
Otherwise, clipped lines would have undefined stippling reset bit if line
stippling is enabled.
(Untested, and I just assume copying over the bits from the original line
is actually the right thing to do.)

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/draw/draw_pipe_clip.c

index 67d8ecaa35f80022195efa94937aae916f540956..2d92d650ab6212eafdb7a1625dcdfb818da61cf7 100644 (file)
@@ -611,6 +611,8 @@ do_clip_line(struct draw_stage *stage,
    struct prim_header newprim;
    int viewport_index;
 
+   newprim.flags = header->flags;
+
    if (stage->draw->rasterizer->flatshade_first) {
       prov_vertex = v0;
    }