radeonsi/gfx9: allow CMASK fast clear with RB+
authorMarek Olšák <marek.olsak@amd.com>
Tue, 28 Mar 2017 01:38:47 +0000 (03:38 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 31 Mar 2017 19:41:57 +0000 (21:41 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index d811a77ca869c36151014c6880354a9d11f03ada..8110ec1484c73f8ac99fb9c6e860f83c2c2c0d8d 100644 (file)
@@ -2691,13 +2691,13 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
                    !(rctx->screen->debug_flags & DBG_NO_DCC_FB)) {
                        vi_separate_dcc_try_enable(rctx, tex);
 
-                       /* RB+ isn't supported with a CMASK-based clear, so all
-                        * clears are considered to be hypothetically slow
+                       /* RB+ isn't supported with a CMASK clear only on Stoney,
+                        * so all clears are considered to be hypothetically slow
                         * clears, which is weighed when determining whether to
                         * enable separate DCC.
                         */
                        if (tex->dcc_gather_statistics &&
-                           rctx->screen->rbplus_allowed)
+                           rctx->family == CHIP_STONEY)
                                tex->num_slow_clears++;
                }
 
@@ -2729,8 +2729,8 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
                                continue;
                        }
 
-                       /* RB+ doesn't work with CMASK fast clear. */
-                       if (rctx->screen->rbplus_allowed)
+                       /* RB+ doesn't work with CMASK fast clear on Stoney. */
+                       if (rctx->family == CHIP_STONEY)
                                continue;
 
                        /* ensure CMASK is enabled */