From: Marek Olšák Date: Tue, 7 Jan 2020 02:27:25 +0000 (-0500) Subject: radeonsi: test polygon mode enablement accurately X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=79cc7e6ff0725c9840ef687f810b5298aba48f74;p=mesa.git radeonsi: test polygon mode enablement accurately Reviewed-by: Pierre-Eric Pelloux-Prayer --- diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 37b618ccb46..24714576f00 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -919,8 +919,10 @@ static void *si_create_rs_state(struct pipe_context *ctx, rs->flatshade_first = state->flatshade_first; rs->sprite_coord_enable = state->sprite_coord_enable; rs->rasterizer_discard = state->rasterizer_discard; - rs->polygon_mode_enabled = state->fill_front != PIPE_POLYGON_MODE_FILL || - state->fill_back != PIPE_POLYGON_MODE_FILL; + rs->polygon_mode_enabled = (state->fill_front != PIPE_POLYGON_MODE_FILL && + !(state->cull_face & PIPE_FACE_FRONT)) || + (state->fill_back != PIPE_POLYGON_MODE_FILL && + !(state->cull_face & PIPE_FACE_BACK)); rs->pa_sc_line_stipple = state->line_stipple_enable ? S_028A0C_LINE_PATTERN(state->line_stipple_pattern) | S_028A0C_REPEAT_COUNT(state->line_stipple_factor) : 0;