vulkan/wsi/wayland: remove format switch from wl_shm_format_for_vk_format
authorSimon Ser <contact@emersion.fr>
Thu, 20 Jan 2022 11:10:42 +0000 (12:10 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 1 Feb 2022 08:00:22 +0000 (08:00 +0000)
commit713a4363e5f2f1403bd373116985ee1eada5222c
treec7604a640bee3de7f8d9b8976b3b4941d54a4e7b
parent5a82232e5cb43d753339c77ab02f14d2621f1687
vulkan/wsi/wayland: remove format switch from wl_shm_format_for_vk_format

Instead of maintaining two similar switches (one for DRM formats,
one for wl_shm formats), only maintain a single switch (for DRM)
and convert DRM formats to enum wl_shm_format. This reduces the
risk to have inconsistencies between these two functions.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14634>
src/vulkan/wsi/wsi_common_wayland.c