summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/mesa/mesa/0002-dri-bring-back-use-flags-for-createImageWithModifier.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/mesa/mesa/0002-dri-bring-back-use-flags-for-createImageWithModifier.patch')
-rw-r--r--recipes-graphics/mesa/mesa/0002-dri-bring-back-use-flags-for-createImageWithModifier.patch119
1 files changed, 0 insertions, 119 deletions
diff --git a/recipes-graphics/mesa/mesa/0002-dri-bring-back-use-flags-for-createImageWithModifier.patch b/recipes-graphics/mesa/mesa/0002-dri-bring-back-use-flags-for-createImageWithModifier.patch
deleted file mode 100644
index 9eee458e..00000000
--- a/recipes-graphics/mesa/mesa/0002-dri-bring-back-use-flags-for-createImageWithModifier.patch
+++ /dev/null
@@ -1,119 +0,0 @@
1From 00add4be8620175ccc69869e22479962dacdce9d Mon Sep 17 00:00:00 2001
2From: Lucas Stach <l.stach@pengutronix.de>
3Date: Fri, 13 Nov 2020 14:38:41 +0100
4Subject: [PATCH 2/6] dri: bring back use flags for createImageWithModifiers
5
6createImageWithModifiers dropped the use flags that were present with
7the createImage interface as it was believed at the time that all those
8use flags could be expressed as a modifier. This turned out to be untrue,
9as there are some use flags like SCANOUT and the BACKBUFFER hint that
10won't ever get a eqivalent modifier expression.
11
12Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
13
14Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7603]
15---
16 include/GL/internal/dri_interface.h | 1 +
17 src/egl/drivers/dri2/platform_wayland.c | 4 ++--
18 src/gallium/frontends/dri/dri2.c | 5 ++---
19 src/gbm/backends/dri/gbm_dri.c | 2 +-
20 src/loader/loader_dri3_helper.c | 3 +++
21 src/mesa/drivers/dri/i965/intel_screen.c | 2 +-
22 6 files changed, 10 insertions(+), 7 deletions(-)
23
24diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
25index 39d5dd07533..222821428d0 100644
26--- a/include/GL/internal/dri_interface.h
27+++ b/include/GL/internal/dri_interface.h
28@@ -1678,6 +1678,7 @@ struct __DRIimageExtensionRec {
29 int width, int height, int format,
30 const uint64_t *modifiers,
31 const unsigned int modifier_count,
32+ unsigned int use,
33 void *loaderPrivate);
34
35 /*
36diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
37index c0b26c4b623..bb508cbe421 100644
38--- a/src/egl/drivers/dri2/platform_wayland.c
39+++ b/src/egl/drivers/dri2/platform_wayland.c
40@@ -595,7 +595,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
41 dri2_surf->base.Height,
42 linear_dri_image_format,
43 &linear_mod,
44- 1,
45+ 1, use_flags,
46 NULL);
47 } else {
48 dri2_surf->back->linear_copy =
49@@ -624,7 +624,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
50 dri2_surf->base.Height,
51 dri_image_format,
52 modifiers,
53- num_modifiers,
54+ num_modifiers, use_flags,
55 NULL);
56 } else {
57 dri2_surf->back->dri_image =
58diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c
59index 1cd42cd8114..1f1e7a9a65e 100644
60--- a/src/gallium/frontends/dri/dri2.c
61+++ b/src/gallium/frontends/dri/dri2.c
62@@ -1074,12 +1074,11 @@ static __DRIimage *
63 dri2_create_image_with_modifiers(__DRIscreen *dri_screen,
64 int width, int height, int format,
65 const uint64_t *modifiers,
66- const unsigned count,
67+ const unsigned count, unsigned int use,
68 void *loaderPrivate)
69 {
70 return dri2_create_image_common(dri_screen, width, height, format,
71- __DRI_IMAGE_USE_SHARE, modifiers, count,
72- loaderPrivate);
73+ use, modifiers, count, loaderPrivate);
74 }
75
76 static bool
77diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
78index b5634741554..aff3a107e7d 100644
79--- a/src/gbm/backends/dri/gbm_dri.c
80+++ b/src/gbm/backends/dri/gbm_dri.c
81@@ -1173,7 +1173,7 @@ gbm_dri_bo_create(struct gbm_device *gbm,
82 width, height,
83 dri_format,
84 modifiers, count,
85- bo);
86+ dri_use, bo);
87
88 if (bo->image) {
89 /* The client passed in a list of invalid modifiers */
90diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
91index ccf8d1795e7..6fc6a2b705a 100644
92--- a/src/loader/loader_dri3_helper.c
93+++ b/src/loader/loader_dri3_helper.c
94@@ -1407,6 +1407,9 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format,
95 format,
96 modifiers,
97 count,
98+ __DRI_IMAGE_USE_SHARE |
99+ __DRI_IMAGE_USE_SCANOUT |
100+ __DRI_IMAGE_USE_BACKBUFFER,
101 buffer);
102 }
103
104diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
105index 4492d43c040..4511b962eef 100644
106--- a/src/mesa/drivers/dri/i965/intel_screen.c
107+++ b/src/mesa/drivers/dri/i965/intel_screen.c
108@@ -893,7 +893,7 @@ static __DRIimage *
109 intel_create_image_with_modifiers(__DRIscreen *dri_screen,
110 int width, int height, int format,
111 const uint64_t *modifiers,
112- const unsigned count,
113+ const unsigned count, unsigned int use,
114 void *loaderPrivate)
115 {
116 return intel_create_image_common(dri_screen, width, height, format, 0,
117--
1182.26.2
119