gallium/radeon: more use of vi_dcc_formats_are_incompatible()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 27 Sep 2017 07:29:27 +0000 (09:29 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 27 Sep 2017 07:31:24 +0000 (09:31 +0200)
Found by inspection.

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

index f7b9740895b1a1c73e87fda86c3ffcae8859b1f2..829d1058271a7da01da9c83f728061c78b14639c 100644 (file)
@@ -1910,8 +1910,7 @@ void vi_disable_dcc_if_incompatible_format(struct r600_common_context *rctx,
 {
        struct r600_texture *rtex = (struct r600_texture *)tex;
 
-       if (vi_dcc_enabled(rtex, level) &&
-           !vi_dcc_formats_compatible(tex->format, view_format))
+       if (vi_dcc_formats_are_incompatible(tex, level, view_format))
                if (!si_texture_disable_dcc(rctx, (struct r600_texture*)tex))
                        rctx->decompress_dcc(&rctx->b, rtex);
 }