gsk: Require dmabuf support for Vulkan

Don't use the Vulkan renderer if Vulkan doesn't support any
dmabuf formats.
This commit is contained in:
Matthias Clasen 2024-05-01 21:26:54 -04:00
parent 200cacc3ad
commit 32a4f805b8

View File

@ -679,9 +679,16 @@ vulkan_supported_platform (GdkSurface *surface,
if (props.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU)
{
if (!as_fallback)
GSK_DEBUG (RENDERER,
"Not using '%s': device is CPU",
g_type_name (renderer_type));
GSK_DEBUG (RENDERER, "Not using '%s': device is CPU", g_type_name (renderer_type));
return FALSE;
}
gdk_display_init_dmabuf (display);
if (!display->vk_dmabuf_formats ||
gdk_dmabuf_formats_get_n_formats (display->vk_dmabuf_formats) == 0)
{
if (!as_fallback)
GSK_DEBUG (RENDERER, "Not using '%s': no dmabuf support", g_type_name (renderer_type));
return FALSE;
}