From: Lionel Landwerlin Date: Sat, 17 Jul 2021 14:38:42 +0000 (+0300) Subject: loader/dri3: create linear buffer with scanout support X-Git-Tag: upstream/22.3.5~19761 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1a66e7c90ceb4796085989d0d8374689753121e;p=platform%2Fupstream%2Fmesa.git loader/dri3: create linear buffer with scanout support If we have a different GPU dealing with display, we fallback to exchanging linear buffers with the compositor. We should specify in creating the linear buffer that this could be used for display. Signed-off-by: Lionel Landwerlin Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4706 Cc: mesa-stable Acked-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Marek Olšák Part-of: --- diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index 608eff5e..6e825f9 100644 --- a/src/loader/loader_dri3_helper.c +++ b/src/loader/loader_dri3_helper.c @@ -1448,7 +1448,8 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format, dri3_linear_format_for_format(draw, format), __DRI_IMAGE_USE_SHARE | __DRI_IMAGE_USE_LINEAR | - __DRI_IMAGE_USE_BACKBUFFER, + __DRI_IMAGE_USE_BACKBUFFER | + __DRI_IMAGE_USE_SCANOUT, buffer); pixmap_buffer = linear_buffer_display_gpu; } @@ -1460,7 +1461,8 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format, dri3_linear_format_for_format(draw, format), __DRI_IMAGE_USE_SHARE | __DRI_IMAGE_USE_LINEAR | - __DRI_IMAGE_USE_BACKBUFFER, + __DRI_IMAGE_USE_BACKBUFFER | + __DRI_IMAGE_USE_SCANOUT, buffer); pixmap_buffer = buffer->linear_buffer;