radeonsi: fix polygon mode for points and lines and point/line fill modes
authorMarek Olšák <marek.olsak@amd.com>
Thu, 23 Oct 2014 11:44:14 +0000 (13:44 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 28 Oct 2014 22:20:45 +0000 (23:20 +0100)
Fixes piglit/polygon-mode-offset.

Cc: 10.2 10.3 mesa-stable@lists.freedesktop.org
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index 16d8493e6e24209455cf7d10ae82a52ed4d18a04..030d6e996281a57828031d76c78187826a409bde 100644 (file)
@@ -599,9 +599,9 @@ static void *si_create_rs_state(struct pipe_context *ctx,
                S_028814_CULL_FRONT(state->rasterizer_discard || (state->cull_face & PIPE_FACE_FRONT) ? 1 : 0) |
                S_028814_CULL_BACK(state->rasterizer_discard || (state->cull_face & PIPE_FACE_BACK) ? 1 : 0) |
                S_028814_FACE(!state->front_ccw) |
-               S_028814_POLY_OFFSET_FRONT_ENABLE(state->offset_tri) |
-               S_028814_POLY_OFFSET_BACK_ENABLE(state->offset_tri) |
-               S_028814_POLY_OFFSET_PARA_ENABLE(state->offset_tri) |
+               S_028814_POLY_OFFSET_FRONT_ENABLE(util_get_offset(state, state->fill_front)) |
+               S_028814_POLY_OFFSET_BACK_ENABLE(util_get_offset(state, state->fill_back)) |
+               S_028814_POLY_OFFSET_PARA_ENABLE(state->offset_point || state->offset_line) |
                S_028814_POLY_MODE(polygon_dual_mode) |
                S_028814_POLYMODE_FRONT_PTYPE(si_translate_fill(state->fill_front)) |
                S_028814_POLYMODE_BACK_PTYPE(si_translate_fill(state->fill_back));