summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/dri2/platform_drm.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index e5e8c605963..cf35ce8a1f2 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -230,10 +230,21 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
if (dri2_surf->back == NULL)
return -1;
- if (dri2_surf->back->bo == NULL)
- dri2_surf->back->bo = gbm_bo_create(&dri2_dpy->gbm_dri->base.base,
- surf->base.width, surf->base.height,
- surf->base.format, surf->base.flags);
+ if (dri2_surf->back->bo == NULL) {
+ if (surf->base.modifiers)
+ dri2_surf->back->bo = gbm_bo_create_with_modifiers(&dri2_dpy->gbm_dri->base.base,
+ surf->base.width, surf->base.height,
+ surf->base.format,
+ surf->base.modifiers,
+ surf->base.count);
+ else
+ dri2_surf->back->bo = gbm_bo_create(&dri2_dpy->gbm_dri->base.base,
+ surf->base.width,
+ surf->base.height,
+ surf->base.format,
+ surf->base.flags);
+
+ }
if (dri2_surf->back->bo == NULL)
return -1;