713a4363e5
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>