vulkan/wsi/wayland: Fix add_wl_shm_format alpha/opaqueness.
We need both the SHM format with alpha and the opaque format to fully support
a vulkan format with alpha. Previously no surface format was reported because
the vulkan formats with aplha were never added as opaque.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5879
Fixes: d944136f36 ("vulkan/wsi/wayland: don't expose surface formats not fully supported")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14588>
This commit is contained in:
@@ -336,11 +336,17 @@ wsi_wl_display_add_wl_shm_format(struct wsi_wl_display *display,
|
||||
case WL_SHM_FORMAT_XBGR8888:
|
||||
wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_R8G8B8_SRGB,
|
||||
false, true);
|
||||
true, true);
|
||||
wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_R8G8B8_UNORM,
|
||||
true, true);
|
||||
wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_R8G8B8A8_SRGB,
|
||||
false, true);
|
||||
FALLTHROUGH;
|
||||
wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_R8G8B8A8_UNORM,
|
||||
false, true);
|
||||
break;
|
||||
case WL_SHM_FORMAT_ABGR8888:
|
||||
wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_R8G8B8A8_SRGB,
|
||||
@@ -352,11 +358,17 @@ wsi_wl_display_add_wl_shm_format(struct wsi_wl_display *display,
|
||||
case WL_SHM_FORMAT_XRGB8888:
|
||||
wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_B8G8R8_SRGB,
|
||||
false, true);
|
||||
true, true);
|
||||
wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_B8G8R8_UNORM,
|
||||
true, true);
|
||||
wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_B8G8R8A8_SRGB,
|
||||
false, true);
|
||||
FALLTHROUGH;
|
||||
wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_B8G8R8A8_UNORM,
|
||||
false, true);
|
||||
break;
|
||||
case WL_SHM_FORMAT_ARGB8888:
|
||||
wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_B8G8R8A8_SRGB,
|
||||
|
||||
Reference in New Issue
Block a user