A format needs to be either alpha or opaque, but can't be neither.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14874>
struct u_vector *formats,
VkFormat format, uint32_t flags)
{
+ assert(flags & (WSI_WL_FMT_ALPHA | WSI_WL_FMT_OPAQUE));
+
/* Don't add a format that's already in the list */
struct wsi_wl_format *f = find_format(formats, format);
if (f) {