mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 16:40:13 +01:00
vulkan/wsi/wayland: Convert missing vulkan formats to shm formats.
Fixes:6b36f35734("vulkan/wsi/wl: add wl_shm support for lavapipe.") 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> (cherry picked from commita881b6ac1f)
This commit is contained in:
parent
6f916ec0c0
commit
09499c4202
2 changed files with 7 additions and 1 deletions
|
|
@ -3109,7 +3109,7 @@
|
|||
"description": "vulkan/wsi/wayland: Convert missing vulkan formats to shm formats.",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "6b36f35734a9ffa2c6fde475933eb46d7f4fb6f4"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -439,6 +439,12 @@ wl_shm_format_for_vk_format(VkFormat vk_format, bool alpha)
|
|||
case VK_FORMAT_B8G8R8A8_UNORM:
|
||||
case VK_FORMAT_B8G8R8A8_SRGB:
|
||||
return alpha ? WL_SHM_FORMAT_ARGB8888 : WL_SHM_FORMAT_XRGB8888;
|
||||
case VK_FORMAT_R8G8B8_UNORM:
|
||||
case VK_FORMAT_R8G8B8_SRGB:
|
||||
return WL_SHM_FORMAT_XBGR8888;
|
||||
case VK_FORMAT_B8G8R8_UNORM:
|
||||
case VK_FORMAT_B8G8R8_SRGB:
|
||||
return WL_SHM_FORMAT_XRGB8888;
|
||||
|
||||
default:
|
||||
assert(!"Unsupported Vulkan format");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue