From e48f2da7da95776a271be0737ca2bb93e0f22ba5 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Mon, 6 Jan 2025 14:49:33 +0100 Subject: [PATCH] panfrost: Move MALI_EXTRACT_INDEX to pan_format.h Move MALI_EXTRACT_INDEX to pan_format.h where all format-related macros live and kill the unused MALI_EXTRACT_TYPE and MALI_FORMAT_COMPRESSED macros. Signed-off-by: Boris Brezillon Reviewed-by: Mary Guillemard Part-of: --- src/panfrost/include/panfrost-job.h | 4 ---- src/panfrost/lib/pan_format.h | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index da0d43fff50..3d8c5012e18 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -32,10 +32,6 @@ #include #include -#define MALI_FORMAT_COMPRESSED (0 << 5) -#define MALI_EXTRACT_TYPE(fmt) ((fmt)&0xe0) -#define MALI_EXTRACT_INDEX(pixfmt) (((pixfmt) >> 12) & 0xFF) - #define MAX_MIP_LEVELS (17) #define MAX_IMAGE_PLANES (3) diff --git a/src/panfrost/lib/pan_format.h b/src/panfrost/lib/pan_format.h index ae375aafa36..4e73d486b26 100644 --- a/src/panfrost/lib/pan_format.h +++ b/src/panfrost/lib/pan_format.h @@ -192,6 +192,8 @@ struct pan_decomposed_swizzle #endif +#define MALI_EXTRACT_INDEX(pixfmt) (((pixfmt) >> 12) & 0xFF) + static inline bool panfrost_format_is_yuv(enum pipe_format f) { enum util_format_layout layout = util_format_description(f)->layout;