radeonsi: drop useless memcmp() check in si_set_blend_color()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 25 May 2017 23:42:53 +0000 (01:42 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 27 May 2017 16:00:45 +0000 (18:00 +0200)
cso_set_blend_color() already checks if the old state is different.
Only Nine uses pipe::set_blend_color() directly but I guess it
should use the cache too.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index 363f32170a9b0ca5eb3aabe1984b7ceae7d5eb82..ae7c91f4755391a44dd8437bffc1053cc7471ee8 100644 (file)
@@ -619,9 +619,6 @@ static void si_set_blend_color(struct pipe_context *ctx,
 {
        struct si_context *sctx = (struct si_context *)ctx;
 
-       if (memcmp(&sctx->blend_color.state, state, sizeof(*state)) == 0)
-               return;
-
        sctx->blend_color.state = *state;
        si_mark_atom_dirty(sctx, &sctx->blend_color.atom);
 }