diff options
Diffstat (limited to 'recipes-graphics/mesa/mesa/0007-frontend-dri-add-EXPLICIT_FLUSH-hint-in-dri2_resourc.patch')
-rw-r--r-- | recipes-graphics/mesa/mesa/0007-frontend-dri-add-EXPLICIT_FLUSH-hint-in-dri2_resourc.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-graphics/mesa/mesa/0007-frontend-dri-add-EXPLICIT_FLUSH-hint-in-dri2_resourc.patch b/recipes-graphics/mesa/mesa/0007-frontend-dri-add-EXPLICIT_FLUSH-hint-in-dri2_resourc.patch new file mode 100644 index 00000000..43bd86bd --- /dev/null +++ b/recipes-graphics/mesa/mesa/0007-frontend-dri-add-EXPLICIT_FLUSH-hint-in-dri2_resourc.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 3824429da0e0e68b78534b1e0ab7e386bcb2b2e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lucas Stach <l.stach@pengutronix.de> | ||
3 | Date: Fri, 13 Nov 2020 14:59:52 +0100 | ||
4 | Subject: [PATCH] frontend/dri: add EXPLICIT_FLUSH hint in | ||
5 | dri2_resource_get_param | ||
6 | |||
7 | dri2_resource_get_param() is called from two different places right now. | ||
8 | Only one of them adds the EXPLICIT_FLUSH hint to the handle usage, which | ||
9 | may disable the optimizations provided by this hint without a reason. | ||
10 | |||
11 | Make sure to always add this hint when appropriate. | ||
12 | |||
13 | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> | ||
14 | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7603> | ||
15 | Upstream-Status: Applied [https://gitlab.freedesktop.org/mesa/mesa/-/commit/3824429da0e0e68b78534b1e0ab7e386bcb2b2e2] | ||
16 | --- | ||
17 | src/gallium/frontends/dri/dri2.c | 6 +++--- | ||
18 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c | ||
21 | index 0220513368e..8ed47c25825 100644 | ||
22 | --- a/src/gallium/frontends/dri/dri2.c | ||
23 | +++ b/src/gallium/frontends/dri/dri2.c | ||
24 | @@ -1252,6 +1252,9 @@ dri2_resource_get_param(__DRIimage *image, enum pipe_resource_param param, | ||
25 | if (!pscreen->resource_get_param) | ||
26 | return false; | ||
27 | |||
28 | + if (image->use & __DRI_IMAGE_USE_BACKBUFFER) | ||
29 | + handle_usage |= PIPE_HANDLE_USAGE_EXPLICIT_FLUSH; | ||
30 | + | ||
31 | return pscreen->resource_get_param(pscreen, NULL, image->texture, | ||
32 | image->plane, 0, 0, param, handle_usage, | ||
33 | value); | ||
34 | @@ -1296,9 +1299,6 @@ dri2_query_image_by_resource_param(__DRIimage *image, int attrib, int *value) | ||
35 | |||
36 | handle_usage = PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE; | ||
37 | |||
38 | - if (image->use & __DRI_IMAGE_USE_BACKBUFFER) | ||
39 | - handle_usage |= PIPE_HANDLE_USAGE_EXPLICIT_FLUSH; | ||
40 | - | ||
41 | if (!dri2_resource_get_param(image, param, handle_usage, &res_param)) | ||
42 | return false; | ||
43 | |||
44 | -- | ||
45 | 2.31.1 | ||
46 | |||