pan/mod: Add a pan_mod_get_handler() implementation when PAN_ARCH is defined

This allows us to call pan_mod_get_handler() from static inline
functions defined in headers that are included from per-gen and
gen-agnostic source files.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35761>
This commit is contained in:
Boris Brezillon 2025-06-26 08:36:50 +02:00 committed by Marge Bot
parent 7ea1da4af4
commit 0812e945e1

View file

@ -47,6 +47,13 @@ struct pan_mod_handler {
#ifdef PAN_ARCH
const struct pan_mod_handler *GENX(pan_mod_get_handler)(uint64_t modifier);
static inline const struct pan_mod_handler *
pan_mod_get_handler(unsigned arch, uint64_t modifier)
{
assert(arch == PAN_ARCH);
return GENX(pan_mod_get_handler)(modifier);
}
#else
const struct pan_mod_handler *pan_mod_get_handler_v4(uint64_t modifier);
const struct pan_mod_handler *pan_mod_get_handler_v5(uint64_t modifier);