diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index ab530fb78d6..306ca9440fa 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -1131,8 +1131,8 @@ get_back_bo(struct dri2_egl_surface *dri2_surf) &buffer_fds[0], num_planes, &strides[0], &offsets[0], __DRI_YUV_COLOR_SPACE_UNDEFINED, __DRI_YUV_RANGE_UNDEFINED, __DRI_YUV_CHROMA_SITING_UNDEFINED, - __DRI_YUV_CHROMA_SITING_UNDEFINED, 0, &error, - dri2_surf->back); + __DRI_YUV_CHROMA_SITING_UNDEFINED, __DRI_IMAGE_PRIME_LINEAR_BUFFER, + &error, dri2_surf->back); for (i = 0; i < num_planes; ++i) { if (buffer_fds[i] != -1) diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index 3da0d755121..5ce777f3708 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -1808,13 +1808,17 @@ dri2_from_dma_bufs3(__DRIscreen *screen, unsigned *error, void *loaderPrivate) { + unsigned bind = 0; __DRIimage *img; + if (flags & __DRI_IMAGE_PROTECTED_CONTENT_FLAG) + bind |= PIPE_BIND_PROTECTED; + if (flags & __DRI_IMAGE_PRIME_LINEAR_BUFFER) + bind |= PIPE_BIND_PRIME_BLIT_DST; + img = dri2_create_image_from_fd(screen, width, height, fourcc, modifier, fds, num_fds, strides, offsets, - (flags & __DRI_IMAGE_PROTECTED_CONTENT_FLAG) ? - PIPE_BIND_PROTECTED : 0, - error, loaderPrivate); + bind, error, loaderPrivate); if (img == NULL) return NULL;