summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2015-10-21 12:28:00 +0200
committerMarek Olšák <[email protected]>2016-03-09 15:02:25 +0100
commitd943ac432de1f46cea47bdbf5ffe5365e2aef386 (patch)
treee2d3c5e38aef81af1fd376b292d43e217c6990c2 /src/egl/drivers/dri2
parent2188c77a0ee9b29f89dde316116d53fe22e526e0 (diff)
dri: add backbuffer use flag
This will be used by the next commit. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 341acb7ed1b..ff0d5c802ac 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -305,7 +305,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
{
struct dri2_egl_display *dri2_dpy =
dri2_egl_display(dri2_surf->base.Resource.Display);
- int i;
+ int i, use_flags;
unsigned int dri_image_format;
/* currently supports three WL DRM formats,
@@ -352,6 +352,8 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
if (dri2_surf->back == NULL)
return -1;
+ use_flags = __DRI_IMAGE_USE_SHARE | __DRI_IMAGE_USE_BACKBUFFER;
+
if (dri2_dpy->is_different_gpu &&
dri2_surf->back->linear_copy == NULL) {
dri2_surf->back->linear_copy =
@@ -359,7 +361,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
dri2_surf->base.Width,
dri2_surf->base.Height,
dri_image_format,
- __DRI_IMAGE_USE_SHARE |
+ use_flags |
__DRI_IMAGE_USE_LINEAR,
NULL);
if (dri2_surf->back->linear_copy == NULL)
@@ -373,7 +375,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
dri2_surf->base.Height,
dri_image_format,
dri2_dpy->is_different_gpu ?
- 0 : __DRI_IMAGE_USE_SHARE,
+ 0 : use_flags,
NULL);
dri2_surf->back->age = 0;
}