radeonsi: fix line stippling and provoking vertex state for GS primitives
authorMarek Olšák <marek.olsak@amd.com>
Mon, 8 Dec 2014 11:41:37 +0000 (12:41 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 10 Dec 2014 20:59:37 +0000 (21:59 +0100)
I'm not sure if GS hw outputs line lists or line strips.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_state_draw.c

index 195d98118f41bbd3eaab5d101cb80bd924bc5081..4383da4ad0922853f24732efc79ac3f5fe77c10a 100644 (file)
@@ -153,7 +153,9 @@ static void si_emit_rasterizer_prim_state(struct si_context *sctx, unsigned mode
 {
        struct radeon_winsys_cs *cs = sctx->b.rings.gfx.cs;
 
-       /* TODO: this should use the GS output primitive type. */
+       if (sctx->gs_shader)
+               mode = sctx->gs_shader->gs_output_prim;
+
        r600_write_context_reg(cs, R_028A0C_PA_SC_LINE_STIPPLE,
                sctx->pa_sc_line_stipple |
                S_028A0C_AUTO_RESET_CNTL(mode == PIPE_PRIM_LINES ? 1 :