summaryrefslogtreecommitdiff
path: root/hw/xwayland/xwayland-glamor-gbm.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-02-01 15:50:15 +0100
committerOlivier Fourdan <ofourdan@redhat.com>2023-04-12 10:44:25 +0200
commitf31ca9238f845a1d9bea5b4410c0597ffe70e8d1 (patch)
tree95e65a449f879eb00c8355a849373eb76545705c /hw/xwayland/xwayland-glamor-gbm.c
parentda0de3caf62023d2b507ed3d66a0b0daa7104c4a (diff)
downloadxserver-f31ca9238f845a1d9bea5b4410c0597ffe70e8d1.tar.gz
xwayland: use gbm_bo_create_with_modifiers2()
This allows us to pass flags to the function, avoiding the forced implicit GBM_BO_USE_SCANOUT which happens with the older version. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Diffstat (limited to 'hw/xwayland/xwayland-glamor-gbm.c')
-rw-r--r--hw/xwayland/xwayland-glamor-gbm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 83318fe62..37633ec96 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -307,9 +307,16 @@ xwl_glamor_gbm_create_pixmap_internal(struct xwl_screen *xwl_screen,
&num_modifiers, &modifiers);
}
- if (num_modifiers > 0)
+ if (num_modifiers > 0) {
+#ifdef GBM_BO_WITH_MODIFIERS2
+ bo = gbm_bo_create_with_modifiers2(xwl_gbm->gbm, width, height,
+ format, modifiers, num_modifiers,
+ GBM_BO_USE_RENDERING);
+#else
bo = gbm_bo_create_with_modifiers(xwl_gbm->gbm, width, height,
format, modifiers, num_modifiers);
+#endif
+ }
free(modifiers);
}
#endif