mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
vulkan/wsi/wayland: Fix add_drm_format_modifier aplha/opaqueness.
This had the opposite problem of the shm path. R8G8B8A8 was always support if
either DRM_FORMAT_XBGR8888 or DRM_FORMAT_ABGR8888 was supported, but we need
both.
Fixes: d944136f36 ("vulkan/wsi/wayland: don't expose surface formats not fully supported")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14588>
This commit is contained in:
parent
9843fddfff
commit
cbe4943ae9
1 changed files with 19 additions and 6 deletions
|
|
@ -298,14 +298,21 @@ wsi_wl_display_add_drm_format_modifier(struct wsi_wl_display *display,
|
|||
wsi_wl_format_add_modifier(format, modifier);
|
||||
if (srgb_format)
|
||||
wsi_wl_format_add_modifier(srgb_format, modifier);
|
||||
FALLTHROUGH;
|
||||
|
||||
srgb_format = wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_R8G8B8A8_SRGB,
|
||||
false, true);
|
||||
format = wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_R8G8B8A8_UNORM,
|
||||
false, true);
|
||||
break;
|
||||
case DRM_FORMAT_ABGR8888:
|
||||
srgb_format = wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_R8G8B8A8_SRGB,
|
||||
true, true);
|
||||
true, false);
|
||||
format = wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_R8G8B8A8_UNORM,
|
||||
true, true);
|
||||
true, false);
|
||||
break;
|
||||
case DRM_FORMAT_XRGB8888:
|
||||
srgb_format = wsi_wl_display_add_vk_format(display, formats,
|
||||
|
|
@ -319,14 +326,20 @@ wsi_wl_display_add_drm_format_modifier(struct wsi_wl_display *display,
|
|||
if (srgb_format)
|
||||
wsi_wl_format_add_modifier(srgb_format, modifier);
|
||||
|
||||
FALLTHROUGH;
|
||||
srgb_format = wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_B8G8R8A8_SRGB,
|
||||
false, true);
|
||||
format = wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_B8G8R8A8_UNORM,
|
||||
false, true);
|
||||
break;
|
||||
case DRM_FORMAT_ARGB8888:
|
||||
srgb_format = wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_B8G8R8A8_SRGB,
|
||||
true, true);
|
||||
true, false);
|
||||
format = wsi_wl_display_add_vk_format(display, formats,
|
||||
VK_FORMAT_B8G8R8A8_UNORM,
|
||||
true, true);
|
||||
true, false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue