radeonsi: remove useless check in si_blit_decompress_color()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 27 Sep 2017 07:30:46 +0000 (09:30 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 27 Sep 2017 07:31:24 +0000 (09:31 +0200)
That's unnecessary to double-check that dcc_offset is not 0
because all callers already check that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_blit.c

index 159893dfa11ba836d4277a5a0963efde63909636..f5ae072f4f8306d5e53d09b04b17bf2581493fd1 100644 (file)
@@ -470,9 +470,11 @@ static void si_blit_decompress_color(struct pipe_context *ctx,
                             "Decompress Color (levels %u - %u, mask 0x%x)\n\n",
                             first_level, last_level, level_mask);
 
-       if (rtex->dcc_offset && need_dcc_decompress) {
+       if (need_dcc_decompress) {
                custom_blend = sctx->custom_blend_dcc_decompress;
 
+               assert(rtex->dcc_offset);
+
                /* disable levels without DCC */
                for (int i = first_level; i <= last_level; i++) {
                        if (!vi_dcc_enabled(rtex, i))