Commit 0fb528ad authored by Simon Ser's avatar Simon Ser
Browse files

xwayland: don't pass INVALID modifier to EGL

When importing a GBM buffer without an explicit modifier to EGL,
don't pass DRM_FORMAT_MOD_INVALID. Instead, omit the modifier.

Fixes: f1572937 ("Use EGL_LINUX_DMA_BUF_EXT to create GBM bo EGLImages")
parent da9d012a
Pipeline #454472 passed with stages
in 3 minutes and 10 seconds
......@@ -210,10 +210,12 @@ xwl_glamor_gbm_create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo,
ADD_ATTR(img_attrs, attr_num, gbm_bo_get_offset(bo, plane));
ADD_ATTR(img_attrs, attr_num, planeAttrs[plane][PLANE_PITCH]);
ADD_ATTR(img_attrs, attr_num, gbm_bo_get_stride_for_plane(bo, plane));
ADD_ATTR(img_attrs, attr_num, planeAttrs[plane][PLANE_MODIFIER_LO]);
ADD_ATTR(img_attrs, attr_num, (uint32_t)(modifier & 0xFFFFFFFFULL));
ADD_ATTR(img_attrs, attr_num, planeAttrs[plane][PLANE_MODIFIER_HI]);
ADD_ATTR(img_attrs, attr_num, (uint32_t)(modifier >> 32ULL));
if (modifier != DRM_FORMAT_MOD_INVALID) {
ADD_ATTR(img_attrs, attr_num, planeAttrs[plane][PLANE_MODIFIER_LO]);
ADD_ATTR(img_attrs, attr_num, (uint32_t)(modifier & 0xFFFFFFFFULL));
ADD_ATTR(img_attrs, attr_num, planeAttrs[plane][PLANE_MODIFIER_HI]);
ADD_ATTR(img_attrs, attr_num, (uint32_t)(modifier >> 32ULL));
}
}
ADD_ATTR(img_attrs, attr_num, EGL_NONE);
#undef ADD_ATTR
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment