Mesa (master): radeonsi: Do not disable DCC when we have it as a modifier.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 13 03:44:46 UTC 2020


Module: Mesa
Branch: master
Commit: 23b59b6f87c6bffca62c2c78cab9881d8ae75425
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=23b59b6f87c6bffca62c2c78cab9881d8ae75425

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Mon Feb 10 19:00:33 2020 +0100

radeonsi: Do not disable DCC when we have it as a modifier.

Because other processes might be expecting DCC.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6176>

---

 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)



More information about the mesa-commit mailing list