mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-28 02:21:08 +00:00
glamor: 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.
Backport from Xwayland:
f31ca9238f
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
parent
bf86850288
commit
e6885d7e8b
1 changed files with 8 additions and 1 deletions
|
|
@ -391,9 +391,16 @@ glamor_make_pixmap_exportable(PixmapPtr pixmap, Bool modifiers_ok)
|
|||
|
||||
glamor_get_modifiers(screen, format, &num_modifiers, &modifiers);
|
||||
|
||||
if (num_modifiers > 0)
|
||||
if (num_modifiers > 0) {
|
||||
#ifdef GBM_BO_WITH_MODIFIERS2
|
||||
bo = gbm_bo_create_with_modifiers2(glamor_egl->gbm, width, height,
|
||||
format, modifiers, num_modifiers,
|
||||
GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT);
|
||||
#else
|
||||
bo = gbm_bo_create_with_modifiers(glamor_egl->gbm, width, height,
|
||||
format, modifiers, num_modifiers);
|
||||
#endif
|
||||
}
|
||||
if (bo)
|
||||
used_modifiers = TRUE;
|
||||
free(modifiers);
|
||||
|
|
|
|||
Loading…
Reference in a new issue