From 9da37087cf0ef7912194c042ef122048525c141a Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sat, 17 Jul 2021 17:38:42 +0300 Subject: [PATCH] loader/dri3: create linear buffer with scanout support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: (cherry picked from commit f1a66e7c90ceb4796085989d0d8374689753121e) --- .pick_status.json | 2 +- src/loader/loader_dri3_helper.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 9bd499507cc..a6e0b33225c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1993,7 +1993,7 @@ "description": "loader/dri3: create linear buffer with scanout support", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index 6c4b704ae5b..7b7dc6c011f 100644 --- a/src/loader/loader_dri3_helper.c +++ b/src/loader/loader_dri3_helper.c @@ -1444,7 +1444,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;