From: Marek Olšák <marek.ol...@amd.com>

Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com>
---
 src/gallium/drivers/radeon/r600_texture.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_texture.c 
b/src/gallium/drivers/radeon/r600_texture.c
index d811a77..8110ec1 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -2684,27 +2684,27 @@ void evergreen_do_fast_color_clear(struct 
r600_common_context *rctx,
                        continue;
                }
 
                /* Fast clear is the most appropriate place to enable DCC for
                 * displayable surfaces.
                 */
                if (rctx->chip_class >= VI &&
                    !(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++;
                }
 
                /* Try to clear DCC first, otherwise try CMASK. */
                if (vi_dcc_enabled(tex, 0)) {
                        uint32_t reset_value;
                        bool clear_words_needed;
 
                        /* TODO: fix DCC clear */
                        if (rctx->chip_class >= GFX9)
@@ -2722,22 +2722,22 @@ void evergreen_do_fast_color_clear(struct 
r600_common_context *rctx,
 
                        if (clear_words_needed)
                                tex->dirty_level_mask |= 1 << 
fb->cbufs[i]->u.tex.level;
                        tex->separate_dcc_dirty = true;
                } else {
                        /* 128-bit formats are unusupported */
                        if (tex->surface.bpe > 8) {
                                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 */
                        r600_texture_alloc_cmask_separate(rctx->screen, tex);
                        if (tex->cmask.size == 0) {
                                continue;
                        }
 
                        /* Do the fast clear. */
                        rctx->clear_buffer(&rctx->b, &tex->cmask_buffer->b.b,
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to