gsk: Allow Vulkan software rendering as fallback

There is no reason to exclude lavapipe when we accept llvmpipe,
and lavapipe has the advantage that it supports dmabufs.
This commit is contained in:
Matthias Clasen 2024-10-01 20:52:52 -04:00
parent 60878e4186
commit fdea496883

View File

@ -675,13 +675,15 @@ vulkan_supported_platform (GdkSurface *surface,
return FALSE;
}
if (as_fallback)
return TRUE;
vkGetPhysicalDeviceProperties (display->vk_physical_device, &props);
if (props.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU)
{
GSK_DEBUG (RENDERER, "Not using '%s'%s: device is CPU",
g_type_name (renderer_type),
as_fallback ? " as fallback" : "");
GSK_DEBUG (RENDERER, "Not using '%s': device is CPU",
g_type_name (renderer_type));
return FALSE;
}
@ -690,16 +692,12 @@ vulkan_supported_platform (GdkSurface *surface,
if (!display->vk_dmabuf_formats ||
gdk_dmabuf_formats_get_n_formats (display->vk_dmabuf_formats) == 0)
{
GSK_DEBUG (RENDERER, "Not using '%s'%s: no dmabuf support",
g_type_name (renderer_type),
as_fallback ? " as fallback" : "");
GSK_DEBUG (RENDERER, "Not using '%s': no dmabuf support",
g_type_name (renderer_type));
return FALSE;
}
#endif
if (as_fallback)
return TRUE;
#ifdef GDK_WINDOWING_WAYLAND
if (GDK_IS_WAYLAND_DISPLAY (gdk_surface_get_display (surface)))
return TRUE;