From f67b64ae6c489dc78a0768f3f3e8e65901be0f15 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Mon, 1 Jul 2024 07:27:34 -0400 Subject: [PATCH] freedreno/fdl: Add UBWC config struct This will be used for the tiled memcpy implementation, but we add this part of the API first so that subsequent commits can embed it in turnip and set it up. Part-of: --- src/freedreno/fdl/freedreno_layout.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/freedreno/fdl/freedreno_layout.h b/src/freedreno/fdl/freedreno_layout.h index 33042c486ef..9c38b1ec063 100644 --- a/src/freedreno/fdl/freedreno_layout.h +++ b/src/freedreno/fdl/freedreno_layout.h @@ -334,6 +334,23 @@ void fdl6_format_swiz(enum pipe_format format, bool has_z24uint_s8uint, unsigned char *format_swiz); +enum fdl_macrotile_mode { + FDL_MACROTILE_4_CHANNEL, + FDL_MACROTILE_8_CHANNEL, + /* Used internally by turnip */ + FDL_MACROTILE_INVALID = ~0, +}; + +/* Parameters that affect UBWC swizzling. Note that because we don't handle + * compression, this isn't a complete set of knobs. See the documentation in + * fd6_tiled_memcpy.c for a description of each one. + */ +struct fdl_ubwc_config { + unsigned highest_bank_bit; + unsigned bank_swizzle_levels; + enum fdl_macrotile_mode macrotile_mode; +}; + ENDC; #endif /* FREEDRENO_LAYOUT_H_ */