53e5e07c4b
There are a few operations that are modifier specific. Instead of spreading the if (is_mod_x) do_x else if (is_mod_y) do_y ... pattern, let's add the concept of mod handler so we can abstract away these operations and get rid of some boiler-plate. 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> Tested-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>