From f81579628a60de73146c9bc5b774b83a63489a4a Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Tue, 13 Dec 2022 17:07:02 -0500 Subject: [PATCH] intel/aux_map: Ignore format bits when using tile-4 Based on Jianxun's ("iris: don't get format bits in AUX tables"). With gfx12.5+, the compression format is once again coming from the surface state programming. MTL once again uses an aux-map, but it ignores the format bits within the the aux-map metadata. Ref: Bspec 44930: "Compression format from AUX page walk is ignored. Instead compression format from Surface State is used." gfx12.5+ also uses tile-4 rather than y-tiling, so if we don't see y-tiling, we can return 0 from intel_aux_map_format_bits() for the ignored format bits. Rework: * Just return 0 if not using y-tiling as suggested by Nanley. Signed-off-by: Jordan Justen Reviewed-by: Nanley Chery Reviewed-by: Jianxun Zhang Part-of: --- src/intel/common/intel_aux_map.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/intel/common/intel_aux_map.c b/src/intel/common/intel_aux_map.c index 208723e..f68f089 100644 --- a/src/intel/common/intel_aux_map.c +++ b/src/intel/common/intel_aux_map.c @@ -448,13 +448,18 @@ uint64_t intel_aux_map_format_bits(enum isl_tiling tiling, enum isl_format format, uint8_t plane) { + /* gfx12.5+ uses tile-4 rather than y-tiling, and gfx12.5+ also uses + * compression info from the surface state and ignores the aux-map format + * bits metadata. + */ + if (!isl_tiling_is_any_y(tiling)) + return 0; + if (aux_map_debug) fprintf(stderr, "AUX-MAP entry %s, bpp_enc=%d\n", isl_format_get_name(format), isl_format_get_aux_map_encoding(format)); - assert(isl_tiling_is_any_y(tiling)); - uint64_t format_bits = ((uint64_t)isl_format_get_aux_map_encoding(format) << 58) | ((uint64_t)(plane > 0) << 57) | -- 2.7.4