radeonsi: fix SPI state dependency on sprite_coord_enable
authorMarek Olšák <marek.olsak@amd.com>
Mon, 8 Dec 2014 11:51:59 +0000 (12:51 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 10 Dec 2014 20:59:37 +0000 (21:59 +0100)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state_shaders.c

index 59166fa7c0cf500513f23f282863ec5799a64926..fe9666f5f99a350afeb3e766f939aaaaa1814f89 100644 (file)
@@ -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;
 
index f2717b073aae23ddde0ec28aeb8f17bcbc64906d..31d5094d008a594ca5ce972d5822e84dd8c2f93b 100644 (file)
@@ -770,8 +770,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;