radeonsi: Don't always re-compile shaders after they're bound.
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 12 Jun 2012 18:18:24 +0000 (20:18 +0200)
committerMichel Dänzer <michel@daenzer.net>
Tue, 12 Jun 2012 18:18:24 +0000 (20:18 +0200)
src/gallium/drivers/radeonsi/r600_state_common.c

index 697dc30b287897111d47c665ce5be2b1d5c7608e..05b7946512ff5ff8537a13f6ec011077115b01cc 100644 (file)
@@ -666,12 +666,7 @@ static void si_update_derived_state(struct r600_context *rctx)
                        r600_flush_depth_textures(rctx);
        }
 
-       if (rctx->shader_dirty) {
-               si_pipe_shader_destroy(&rctx->context, rctx->vs_shader);
-       }
-
-       if (rctx->shader_dirty ||
-           (rctx->ps_shader->shader.fs_write_all &&
+       if ((rctx->ps_shader->shader.fs_write_all &&
             (rctx->ps_shader->shader.nr_cbufs != rctx->nr_cbufs)) ||
            (rctx->sprite_coord_enable &&
             (rctx->ps_shader->sprite_coord_enable != rctx->sprite_coord_enable))) {