From 23b59b6f87c6bffca62c2c78cab9881d8ae75425 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Mon, 10 Feb 2020 19:00:33 +0100 Subject: [PATCH] radeonsi: Do not disable DCC when we have it as a modifier. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because other processes might be expecting DCC. Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_texture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index af855b58e50..d4638b51621 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -380,7 +380,8 @@ static bool si_can_disable_dcc(struct si_texture *tex) /* We can't disable DCC if it can be written by another process. */ return tex->surface.dcc_offset && (!tex->buffer.b.is_shared || - !(tex->buffer.external_usage & PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE)); + !(tex->buffer.external_usage & PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE)) && + !ac_modifier_has_dcc(tex->surface.modifier); } static bool si_texture_discard_dcc(struct si_screen *sscreen, struct si_texture *tex)