summaryrefslogtreecommitdiff
path: root/src/wayland/meta-wayland-dma-buf.c
diff options
context:
space:
mode:
authorKarol Herbst <kherbst@redhat.com>2020-09-14 20:36:17 +0200
committerKarol Herbst <kherbst@redhat.com>2020-09-28 14:00:44 +0200
commit9b9b912765f49553849e8c8aca7d2a75692ca9cc (patch)
tree4959a15452cb9cbaf50cd43e67da9d9a2a7b8e15 /src/wayland/meta-wayland-dma-buf.c
parent82fffacbae0bd117194e727975d75c09432efa83 (diff)
downloadmutter-9b9b912765f49553849e8c8aca7d2a75692ca9cc.tar.gz
backends: force enable modifiers on tagged devices
Some devices can't scanout to linear buffers directly as the hw is not capable of eg rendering into a linear depth buffer. Add code to force kms-modifiers on udev taged devices. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1408 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1443
Diffstat (limited to 'src/wayland/meta-wayland-dma-buf.c')
-rw-r--r--src/wayland/meta-wayland-dma-buf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-dma-buf.c b/src/wayland/meta-wayland-dma-buf.c
index 3c0321ce0..2f9794a5d 100644
--- a/src/wayland/meta-wayland-dma-buf.c
+++ b/src/wayland/meta-wayland-dma-buf.c
@@ -594,6 +594,15 @@ should_send_modifiers (MetaBackend *backend)
{
MetaSettings *settings = meta_backend_get_settings (backend);
+#ifdef HAVE_NATIVE_BACKEND
+ if (META_IS_BACKEND_NATIVE (backend))
+ {
+ MetaRenderer *renderer = meta_backend_get_renderer (backend);
+ MetaRendererNative *renderer_native = META_RENDERER_NATIVE (renderer);
+ return meta_renderer_native_use_modifiers (renderer_native);
+ }
+#endif
+
return meta_settings_is_experimental_feature_enabled (
settings, META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS);
}