mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 18:58:10 +02:00
egl/drm: Use modifiers for backbuffer creation
Split into a separate patch from the previous patch as requested by Emil. Requested-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
63bd2ae745
commit
191ff914a2
1 changed files with 15 additions and 4 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue