Mesa (master): radeonsi/gfx8: enable TC-compatible HTILE from the beginning as before

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat May 23 08:00:19 UTC 2020


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue May 19 19:30:54 2020 -0400

radeonsi/gfx8: enable TC-compatible HTILE from the beginning as before

Fixes: 0d83e7f4b98 - radeonsi: enable TC-compatible HTILE on demand for best Z/S performance
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2921
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2967

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

---

 src/gallium/drivers/radeonsi/si_texture.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c
index f6f108f3ced..63a3571b0a5 100644
--- a/src/gallium/drivers/radeonsi/si_texture.c
+++ b/src/gallium/drivers/radeonsi/si_texture.c
@@ -995,7 +995,15 @@ static struct si_texture *si_texture_create_object(struct pipe_screen *screen,
    /* don't include stencil-only formats which we don't support for rendering */
    tex->is_depth = util_format_has_depth(util_format_description(tex->buffer.b.b.format));
    tex->surface = *surface;
-   tex->tc_compatible_htile = false; /* This will be enabled on demand. */
+
+   /* On GFX8, HTILE uses different tiling depending on the TC_COMPATIBLE_HTILE
+    * setting, so we have to enable it if we enabled it at allocation.
+    *
+    * GFX9 and later use the same tiling for both, so TC-compatible HTILE can be
+    * enabled on demand.
+    */
+   tex->tc_compatible_htile = sscreen->info.chip_class == GFX8 &&
+                              tex->surface.flags & RADEON_SURF_TC_COMPATIBLE_HTILE;
 
    /* TC-compatible HTILE:
     * - GFX8 only supports Z32_FLOAT.



More information about the mesa-commit mailing list