panfrost: Add MALI_EXTRACT_INDEX helper

Extracts the 8-bit index from a 22-bit pixel format.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7352>
This commit is contained in:
Alyssa Rosenzweig 2020-10-27 14:23:12 -04:00 committed by Marge Bot
parent 1b48b9e619
commit 1e18d9952b

View file

@ -96,6 +96,8 @@ typedef uint64_t mali_ptr;
#define MALI_CHANNEL_FLOAT 7
#define MALI_EXTRACT_BITS(fmt) (fmt & 0x7)
#define MALI_EXTRACT_INDEX(pixfmt) (((pixfmt) >> 12) & 0xFF)
/* The raw Midgard blend payload can either be an equation or a shader
* address, depending on the context */