mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02: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.",
|
"description": "vulkan/wsi/wayland: Convert missing vulkan formats to shm formats.",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 1,
|
"nomination_type": 1,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": "6b36f35734a9ffa2c6fde475933eb46d7f4fb6f4"
|
"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_UNORM:
|
||||||
case VK_FORMAT_B8G8R8A8_SRGB:
|
case VK_FORMAT_B8G8R8A8_SRGB:
|
||||||
return alpha ? WL_SHM_FORMAT_ARGB8888 : WL_SHM_FORMAT_XRGB8888;
|
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:
|
default:
|
||||||
assert(!"Unsupported Vulkan format");
|
assert(!"Unsupported Vulkan format");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue