[Mesa-dev] [PATCH] draw: initialize prim header flags when clipping lines

sroland at vmware.com sroland at vmware.com
Thu Jan 7 10:39:21 PST 2016


From: Roland Scheidegger <sroland at vmware.com>

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.)
---
 src/gallium/auxiliary/draw/draw_pipe_clip.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/auxiliary/draw/draw_pipe_clip.c b/src/gallium/auxiliary/draw/draw_pipe_clip.c
index 67d8eca..2d92d65 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_clip.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_clip.c
@@ -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;
    }
-- 
2.1.4



More information about the mesa-dev mailing list