Mesa (master): ac/surface: don't set is_displayable if displayable DCC is missing

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 11 10:14:15 UTC 2020


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Jun 10 11:43:49 2020 -0400

ac/surface: don't set is_displayable if displayable DCC is missing

If flags.display isn't set, then displayable DCC will not be computed, so
is_displayable will always be false.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5424>

---

 src/amd/common/ac_surface.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
index 0e9604affef..4ef72b1b323 100644
--- a/src/amd/common/ac_surface.c
+++ b/src/amd/common/ac_surface.c
@@ -1932,9 +1932,12 @@ static int gfx9_compute_surface(struct ac_addrlib *addrlib,
 
 		/* Display needs unaligned DCC. */
 		if (surf->num_dcc_levels &&
-		    !is_dcc_supported_by_DCN(info, config, surf,
-					     surf->u.gfx9.dcc.rb_aligned,
-					     surf->u.gfx9.dcc.pipe_aligned))
+		    (!is_dcc_supported_by_DCN(info, config, surf,
+					      surf->u.gfx9.dcc.rb_aligned,
+					      surf->u.gfx9.dcc.pipe_aligned) ||
+		     /* Don't set is_displayable if displayable DCC is missing. */
+		     (info->use_display_dcc_with_retile_blit &&
+		      !surf->u.gfx9.dcc_retile_num_elements)))
 			displayable = false;
 	}
 	surf->is_displayable = displayable;



More information about the mesa-commit mailing list