diff options
Diffstat (limited to 'recipes-graphics/mesa/mesa/0003-loader-dri3-convert-to-loader_dri_create_image.patch')
-rw-r--r-- | recipes-graphics/mesa/mesa/0003-loader-dri3-convert-to-loader_dri_create_image.patch | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/recipes-graphics/mesa/mesa/0003-loader-dri3-convert-to-loader_dri_create_image.patch b/recipes-graphics/mesa/mesa/0003-loader-dri3-convert-to-loader_dri_create_image.patch deleted file mode 100644 index daba1a50..00000000 --- a/recipes-graphics/mesa/mesa/0003-loader-dri3-convert-to-loader_dri_create_image.patch +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | From 8fd5b16efc60ad666b05ec745109d0a482b6157b Mon Sep 17 00:00:00 2001 | ||
2 | From: Lucas Stach <l.stach@pengutronix.de> | ||
3 | Date: Tue, 15 Dec 2020 14:52:28 +0100 | ||
4 | Subject: [PATCH] loader/dri3: convert to loader_dri_create_image | ||
5 | |||
6 | Get rid of the code duplication and makes it easier to hook in a | ||
7 | new createImageWithModifiers2, but obscures the code flow a bit. | ||
8 | |||
9 | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> | ||
10 | Reviewed-by: Daniel Stone <daniels@collabora.com> | ||
11 | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8106> | ||
12 | Upstream-Status: Applied [https://gitlab.freedesktop.org/mesa/mesa/-/commit/8fd5b16efc60ad666b05ec745109d0a482b6157b] | ||
13 | --- | ||
14 | src/loader/loader_dri3_helper.c | 40 ++++++++++----------------------- | ||
15 | 1 file changed, 12 insertions(+), 28 deletions(-) | ||
16 | |||
17 | diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c | ||
18 | index 6c4b704ae5b..c5e340e6942 100644 | ||
19 | --- a/src/loader/loader_dri3_helper.c | ||
20 | +++ b/src/loader/loader_dri3_helper.c | ||
21 | @@ -34,6 +34,7 @@ | ||
22 | |||
23 | #include <X11/Xlib-xcb.h> | ||
24 | |||
25 | +#include "loader_dri_helper.h" | ||
26 | #include "loader_dri3_helper.h" | ||
27 | #include "util/macros.h" | ||
28 | #include "drm-uapi/drm_fourcc.h" | ||
29 | @@ -1314,6 +1315,8 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format, | ||
30 | struct xshmfence *shm_fence; | ||
31 | int buffer_fds[4], fence_fd; | ||
32 | int num_planes = 0; | ||
33 | + uint64_t *modifiers = NULL; | ||
34 | + uint32_t count = 0; | ||
35 | int i, mod; | ||
36 | int ret; | ||
37 | |||
38 | @@ -1348,8 +1351,6 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format, | ||
39 | xcb_dri3_get_supported_modifiers_cookie_t mod_cookie; | ||
40 | xcb_dri3_get_supported_modifiers_reply_t *mod_reply; | ||
41 | xcb_generic_error_t *error = NULL; | ||
42 | - uint64_t *modifiers = NULL; | ||
43 | - uint32_t count = 0; | ||
44 | |||
45 | mod_cookie = xcb_dri3_get_supported_modifiers(draw->conn, | ||
46 | draw->window, | ||
47 | @@ -1395,34 +1396,17 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format, | ||
48 | } | ||
49 | |||
50 | free(mod_reply); | ||
51 | - | ||
52 | - /* don't use createImageWithModifiers() if we have no | ||
53 | - * modifiers, other things depend on the use flags when | ||
54 | - * there are no modifiers to know that a buffer can be | ||
55 | - * shared. | ||
56 | - */ | ||
57 | - if (modifiers) { | ||
58 | - buffer->image = draw->ext->image->createImageWithModifiers(draw->dri_screen, | ||
59 | - width, height, | ||
60 | - format, | ||
61 | - modifiers, | ||
62 | - count, | ||
63 | - buffer); | ||
64 | - } | ||
65 | - | ||
66 | - free(modifiers); | ||
67 | } | ||
68 | #endif | ||
69 | - if (!buffer->image) | ||
70 | - buffer->image = draw->ext->image->createImage(draw->dri_screen, | ||
71 | - width, height, | ||
72 | - format, | ||
73 | - __DRI_IMAGE_USE_SHARE | | ||
74 | - __DRI_IMAGE_USE_SCANOUT | | ||
75 | - __DRI_IMAGE_USE_BACKBUFFER | | ||
76 | - (draw->is_protected_content ? | ||
77 | - __DRI_IMAGE_USE_PROTECTED : 0), | ||
78 | - buffer); | ||
79 | + buffer->image = loader_dri_create_image(draw->dri_screen, draw->ext->image, | ||
80 | + width, height, format, | ||
81 | + __DRI_IMAGE_USE_SHARE | | ||
82 | + __DRI_IMAGE_USE_SCANOUT | | ||
83 | + __DRI_IMAGE_USE_BACKBUFFER | | ||
84 | + (draw->is_protected_content ? | ||
85 | + __DRI_IMAGE_USE_PROTECTED : 0), | ||
86 | + modifiers, count, buffer); | ||
87 | + free(modifiers); | ||
88 | |||
89 | pixmap_buffer = buffer->image; | ||
90 | |||
91 | -- | ||
92 | 2.31.1 | ||
93 | |||