xwayland: fix GBM on driver without explicit modifiers
Some drivers (e.g. AMD GFX8-) don't support explicit format modifiers. On these drivers, gbm_bo_create_with_modifiers() will fail. This results in "Error getting buffer" in the logs later on with all X11 windows staying invisible. Fallback to the modifier-less API gbm_bo_create() in that case. Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
d01a075d59
commit
5aebc01096
|
@ -278,7 +278,7 @@ xwl_glamor_gbm_create_pixmap(ScreenPtr screen,
|
|||
{
|
||||
struct xwl_screen *xwl_screen = xwl_screen_get(screen);
|
||||
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
|
||||
struct gbm_bo *bo;
|
||||
struct gbm_bo *bo = NULL;
|
||||
PixmapPtr pixmap = NULL;
|
||||
|
||||
if (width > 0 && height > 0 && depth >= 15 &&
|
||||
|
@ -297,9 +297,8 @@ xwl_glamor_gbm_create_pixmap(ScreenPtr screen,
|
|||
format, modifiers, num_modifiers);
|
||||
free(modifiers);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (bo == NULL) {
|
||||
bo = gbm_bo_create(xwl_gbm->gbm, width, height, format,
|
||||
GBM_BO_USE_RENDERING);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue