diff options
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c index ffec863ae6f..aa20b918f50 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -359,6 +359,16 @@ fetch_pipeline_generic(struct draw_pt_middle_end *middle, } +static inline unsigned +prim_type(unsigned prim, unsigned flags) +{ + if (flags & DRAW_LINE_LOOP_AS_STRIP) + return PIPE_PRIM_LINE_STRIP; + else + return prim; +} + + static void fetch_pipeline_run(struct draw_pt_middle_end *middle, const unsigned *fetch_elts, @@ -380,7 +390,7 @@ fetch_pipeline_run(struct draw_pt_middle_end *middle, prim_info.start = 0; prim_info.count = draw_count; prim_info.elts = draw_elts; - prim_info.prim = fpme->input_prim; + prim_info.prim = prim_type(fpme->input_prim, prim_flags); prim_info.flags = prim_flags; prim_info.primitive_count = 1; prim_info.primitive_lengths = &draw_count; @@ -408,7 +418,7 @@ fetch_pipeline_linear_run(struct draw_pt_middle_end *middle, prim_info.start = 0; prim_info.count = count; prim_info.elts = NULL; - prim_info.prim = fpme->input_prim; + prim_info.prim = prim_type(fpme->input_prim, prim_flags); prim_info.flags = prim_flags; prim_info.primitive_count = 1; prim_info.primitive_lengths = &count; @@ -439,7 +449,7 @@ fetch_pipeline_linear_run_elts(struct draw_pt_middle_end *middle, prim_info.start = 0; prim_info.count = draw_count; prim_info.elts = draw_elts; - prim_info.prim = fpme->input_prim; + prim_info.prim = prim_type(fpme->input_prim, prim_flags); prim_info.flags = prim_flags; prim_info.primitive_count = 1; prim_info.primitive_lengths = &draw_count; |