Mesa (master): radeonsi: add debug options nodisplaytiling and nodisplaydcc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Feb 13 05:08:48 UTC 2021


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Oct 19 20:21:58 2020 -0400

radeonsi: add debug options nodisplaytiling and nodisplaydcc

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>

---

 src/gallium/drivers/radeonsi/si_pipe.c    | 2 ++
 src/gallium/drivers/radeonsi/si_pipe.h    | 2 ++
 src/gallium/drivers/radeonsi/si_texture.c | 7 +++++--
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 2297834afa4..c380dcfe687 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -106,6 +106,8 @@ static const struct debug_named_value radeonsi_debug_options[] = {
    {"nohyperz", DBG(NO_HYPERZ), "Disable Hyper-Z"},
    {"no2d", DBG(NO_2D_TILING), "Disable 2D tiling"},
    {"notiling", DBG(NO_TILING), "Disable tiling"},
+   {"nodisplaytiling", DBG(NO_DISPLAY_TILING), "Disable display tiling"},
+   {"nodisplaydcc", DBG(NO_DISPLAY_DCC), "Disable display DCC"},
    {"nodcc", DBG(NO_DCC), "Disable DCC."},
    {"nodccclear", DBG(NO_DCC_CLEAR), "Disable DCC fast clear."},
    {"nodccfb", DBG(NO_DCC_FB), "Disable separate DCC on the main framebuffer"},
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index fd161034cb1..d725a5b17a4 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -226,6 +226,8 @@ enum
    DBG_NO_HYPERZ,
    DBG_NO_2D_TILING,
    DBG_NO_TILING,
+   DBG_NO_DISPLAY_TILING,
+   DBG_NO_DISPLAY_DCC,
    DBG_NO_DCC,
    DBG_NO_DCC_CLEAR,
    DBG_NO_DCC_FB,
diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c
index eb0c132f421..59eb29a93ac 100644
--- a/src/gallium/drivers/radeonsi/si_texture.c
+++ b/src/gallium/drivers/radeonsi/si_texture.c
@@ -227,7 +227,9 @@ static int si_init_surface(struct si_screen *sscreen, struct radeon_surf *surfac
     * If it's not present, it will be disabled by
     * si_get_opaque_metadata later.
     */
-   if (!is_imported && (sscreen->debug_flags & DBG(NO_DCC)))
+   if (!is_imported &&
+       (sscreen->debug_flags & DBG(NO_DCC) ||
+	(ptex->bind & PIPE_BIND_SCANOUT && sscreen->debug_flags & DBG(NO_DISPLAY_DCC))))
       flags |= RADEON_SURF_DISABLE_DCC;
 
    if (is_scanout) {
@@ -1160,7 +1162,8 @@ static enum radeon_surf_mode si_choose_tiling(struct si_screen *sscreen,
     * Compressed textures and DB surfaces must always be tiled.
     */
    if (!force_tiling && !is_depth_stencil && !util_format_is_compressed(templ->format)) {
-      if (sscreen->debug_flags & DBG(NO_TILING))
+      if (sscreen->debug_flags & DBG(NO_TILING) ||
+	  (templ->bind & PIPE_BIND_SCANOUT && sscreen->debug_flags & DBG(NO_DISPLAY_TILING)))
          return RADEON_SURF_MODE_LINEAR_ALIGNED;
 
       /* Tiling doesn't work with the 422 (SUBSAMPLED) formats. */



More information about the mesa-commit mailing list