Mesa (master): ac/surface: enable DCC for the first level in the mip tail on gfx10
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 11 10:14:15 UTC 2020
Module: Mesa
Branch: master
Commit: 56f2a77a4149e637d8524780bed121979e7d134e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=56f2a77a4149e637d8524780bed121979e7d134e
Author: Marek Olšák <marek.olsak at amd.com>
Date: Thu Jun 11 04:30:04 2020 -0400
ac/surface: enable DCC for the first level in the mip tail on gfx10
Acked-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 | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
index be55e6deaaa..206cdd26dbe 100644
--- a/src/amd/common/ac_surface.c
+++ b/src/amd/common/ac_surface.c
@@ -1481,7 +1481,16 @@ static int gfx9_compute_miptree(struct ac_addrlib *addrlib,
*/
for (unsigned i = 0; i < in->numMipLevels; i++) {
if (meta_mip_info[i].inMiptail) {
- surf->num_dcc_levels = i;
+ /* GFX10 can only compress the first level
+ * in the mip tail.
+ *
+ * TODO: Try to do the same thing for gfx9
+ * if there are no regressions.
+ */
+ if (info->chip_class >= GFX10)
+ surf->num_dcc_levels = i + 1;
+ else
+ surf->num_dcc_levels = i;
break;
}
}
More information about the mesa-commit
mailing list