Mesa (master): radeonsi: test polygon mode enablement accurately
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jan 8 20:51:04 UTC 2020
Module: Mesa
Branch: master
Commit: 79cc7e6ff0725c9840ef687f810b5298aba48f74
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=79cc7e6ff0725c9840ef687f810b5298aba48f74
Author: Marek Olšák <marek.olsak at amd.com>
Date: Mon Jan 6 21:27:25 2020 -0500
radeonsi: test polygon mode enablement accurately
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
---
src/gallium/drivers/radeonsi/si_state.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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;
More information about the mesa-commit
mailing list