diff options
author | Marek Olšák <marek.olsak@amd.com> | 2016-06-28 13:04:07 +0200 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2016-06-29 16:34:22 +0200 |
commit | 4b11ef23b4c064a6db5fae313b4e2e6bf027c7e1 (patch) | |
tree | 61d661546548a029b2fb9f963d5154565ad263d5 /src/gallium/drivers/radeonsi/si_state_draw.c | |
parent | 789ed13284cb99b96f2aa69f237959b27c5c3bc2 (diff) | |
download | external_mesa3d-4b11ef23b4c064a6db5fae313b4e2e6bf027c7e1.zip external_mesa3d-4b11ef23b4c064a6db5fae313b4e2e6bf027c7e1.tar.gz external_mesa3d-4b11ef23b4c064a6db5fae313b4e2e6bf027c7e1.tar.bz2 |
radeonsi: use conformant line rasterization
AA lines are not completely correct (see TODO), but everything else
should be.
+ 3 linestipple piglits
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state_draw.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 5f866d5..b9a7c14 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -429,10 +429,12 @@ static void si_emit_rasterizer_prim_state(struct si_context *sctx) rs->pa_sc_line_stipple == sctx->last_sc_line_stipple) return; + /* For lines, reset the stipple pattern at each primitive. Otherwise, + * reset the stipple pattern at each packet (line strips, line loops). + */ radeon_set_context_reg(cs, R_028A0C_PA_SC_LINE_STIPPLE, rs->pa_sc_line_stipple | - S_028A0C_AUTO_RESET_CNTL(rast_prim == PIPE_PRIM_LINES ? 1 : - rast_prim == PIPE_PRIM_LINE_STRIP ? 2 : 0)); + S_028A0C_AUTO_RESET_CNTL(rast_prim == PIPE_PRIM_LINES ? 1 : 2)); sctx->last_rast_prim = rast_prim; sctx->last_sc_line_stipple = rs->pa_sc_line_stipple; |