diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2023-03-08 13:58:40 +0100 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2023-03-08 16:26:41 +0100 |
commit | 08b0ea09de120a64c498238cc15b6cc04276ca22 (patch) | |
tree | 25cbd90d9374b0448ffaf19cbf9a03b11692e45c /hw/xwayland/xwayland-glamor-gbm.c | |
parent | 21b3dad2380639573c251d95910bcb644049ee5f (diff) | |
download | xserver-08b0ea09de120a64c498238cc15b6cc04276ca22.tar.gz |
xwayland/glamor/gbm: Only use modifier gbm API if explicit
If we're using implicit modifiers, we'll pass NULL and zero modifiers.
Lets just use the legacy API directly instead.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Diffstat (limited to 'hw/xwayland/xwayland-glamor-gbm.c')
-rw-r--r-- | hw/xwayland/xwayland-glamor-gbm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c index 8e46f30f7..82d9e7880 100644 --- a/hw/xwayland/xwayland-glamor-gbm.c +++ b/hw/xwayland/xwayland-glamor-gbm.c @@ -293,8 +293,10 @@ xwl_glamor_gbm_create_pixmap(ScreenPtr screen, uint64_t *modifiers = NULL; xwl_glamor_get_modifiers(screen, format, &num_modifiers, &modifiers); - bo = gbm_bo_create_with_modifiers(xwl_gbm->gbm, width, height, - format, modifiers, num_modifiers); + + if (num_modifiers > 0) + bo = gbm_bo_create_with_modifiers(xwl_gbm->gbm, width, height, + format, modifiers, num_modifiers); free(modifiers); } #endif |