mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 17:50:10 +00:00
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:
parent
60878e4186
commit
fdea496883
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user