From f660d1cb218d2610b81194d7a7ab83ff5e220005 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 21 Aug 2016 12:39:21 +0200 Subject: [PATCH] gallium/radeon: also eliminate DCC fast clear in resource_get_handle MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit just do what the comment says Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeon/r600_texture.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 912d1234aef..7bdceb1df9d 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -548,14 +548,15 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen, } if (!(usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH) && - rtex->cmask.size) { + (rtex->cmask.size || rtex->dcc_offset)) { /* Eliminate fast clear (both CMASK and DCC) */ r600_eliminate_fast_color_clear(rctx, rtex); /* Disable CMASK if flush_resource isn't going * to be called. */ - r600_texture_discard_cmask(rscreen, rtex); + if (rtex->cmask.size) + r600_texture_discard_cmask(rscreen, rtex); } /* Set metadata. */ -- 2.30.2