[Mesa-dev] [PATCH 16/18] radeonsi: fix SPI state dependency on sprite_coord_enable

Marek Olšák maraeo at gmail.com
Tue Dec 9 03:40:04 PST 2014


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/drivers/radeonsi/si_state.c         | 1 -
 src/gallium/drivers/radeonsi/si_state_shaders.c | 5 ++++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 59166fa..fe9666f 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -700,7 +700,6 @@ static void si_bind_rs_state(struct pipe_context *ctx, void *state)
 		return;
 
 	// TODO
-	sctx->sprite_coord_enable = rs->sprite_coord_enable;
 	sctx->pa_sc_line_stipple = rs->pa_sc_line_stipple;
 	sctx->pa_su_sc_mode_cntl = rs->pa_su_sc_mode_cntl;
 
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 32672d1..afd94c2 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -769,8 +769,11 @@ void si_update_shaders(struct si_context *sctx)
 
 	si_pm4_bind_state(sctx, ps, sctx->ps_shader->current->pm4);
 
-	if (si_pm4_state_changed(sctx, ps) || si_pm4_state_changed(sctx, vs))
+	if (si_pm4_state_changed(sctx, ps) || si_pm4_state_changed(sctx, vs) ||
+	    sctx->sprite_coord_enable != sctx->queued.named.rasterizer->sprite_coord_enable) {
+		sctx->sprite_coord_enable = sctx->queued.named.rasterizer->sprite_coord_enable;
 		si_update_spi_map(sctx);
+	}
 
 	if (sctx->ps_db_shader_control != sctx->ps_shader->current->db_shader_control) {
 		sctx->ps_db_shader_control = sctx->ps_shader->current->db_shader_control;
-- 
2.1.0



More information about the mesa-dev mailing list