vulkan/wsi: unify format logic in dmabuf_handle_modifier
authorSimon Ser <contact@emersion.fr>
Thu, 28 May 2020 17:54:49 +0000 (19:54 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 30 Jun 2021 04:48:19 +0000 (04:48 +0000)
commit14f0c0d9dbf4133a49c8f7790e440fe9c398f2bc
tree19354f1a73e8064b81e2136722dede5e2562c32e
parent63df413f95377120a147cb209b349e914804e208
vulkan/wsi: unify format logic in dmabuf_handle_modifier

This function has a switch which currently duplicates the format
handling logic.

Move this logic out of the switch.

This avoids repeating the same code for each supported format and
prepares the work for proper DRM_FORMAT_MOD_INVALID handling.

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4942>
src/vulkan/wsi/wsi_common_wayland.c