vulkan/wsi/wayland: ensure added formats have flags
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>
This commit is contained in:
parent
5617d5c885
commit
ffdac8bfa7
|
@ -108,6 +108,8 @@ wsi_wl_display_add_vk_format(struct wsi_wl_display *display,
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue