summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/mesa')
-rw-r--r--recipes-graphics/mesa/mesa-demos/0001-YOCIMX-8300-Fix-mesa-demos-build-break-on-GCC-14.patch59
-rw-r--r--recipes-graphics/mesa/mesa-demos/0001-egl-clear-backgrounds-black.patch27
-rw-r--r--recipes-graphics/mesa/mesa-demos/Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch43
-rw-r--r--recipes-graphics/mesa/mesa-demos/fix-clear-build-break.patch12
-rw-r--r--recipes-graphics/mesa/mesa-demos_%.bbappend5
-rw-r--r--recipes-graphics/mesa/mesa-etnaviv-env_0.1.bb6
-rw-r--r--recipes-graphics/mesa/mesa-gl.bbappend (renamed from recipes-graphics/mesa/mesa-gl_%.bbappend)0
-rw-r--r--recipes-graphics/mesa/mesa.bbappend (renamed from recipes-graphics/mesa/mesa_%.bbappend)6
-rw-r--r--recipes-graphics/mesa/mesa/0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch47
-rw-r--r--recipes-graphics/mesa/mesa/0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch33
10 files changed, 209 insertions, 29 deletions
diff --git a/recipes-graphics/mesa/mesa-demos/0001-YOCIMX-8300-Fix-mesa-demos-build-break-on-GCC-14.patch b/recipes-graphics/mesa/mesa-demos/0001-YOCIMX-8300-Fix-mesa-demos-build-break-on-GCC-14.patch
new file mode 100644
index 000000000..91b736ee7
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-demos/0001-YOCIMX-8300-Fix-mesa-demos-build-break-on-GCC-14.patch
@@ -0,0 +1,59 @@
1From 400c42cda81a859bd5950567eaffe394053ccc99 Mon Sep 17 00:00:00 2001
2From: Wujian Sun <wujian.sun_1@nxp.com>
3Date: Thu, 5 Dec 2024 10:32:05 +0800
4Subject: [PATCH] YOCIMX-8300 Fix mesa-demos build break on GCC 14
5
6| ../mesa-demos-8.5.0/src/egl/opengl/eglkms.c: In function 'main':
7| ../mesa-demos-8.5.0/src/egl/opengl/eglkms.c:190:24: error: passing
8argument 1 of 'eglGetDisplay' from incompatible pointer type
9[-Wincompatible-pointer-types]
10| 190 | dpy = eglGetDisplay(gbm);
11| | ^~~
12| | |
13| | struct gbm_device *
14| In file included from ../mesa-demos-8.5.0/src/egl/opengl/eglkms.c:33:
15
16Type' {aka 'struct wl_display *'} but argument is of type 'struct
17gbm_device *'
18| 143 | EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay
19(EGLNativeDisplayType display_id);
20| |
21~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
22| ../mesa-demos-8.5.0/src/egl/opengl/eglkms.c:229:50: error: passing
23argument 3 of 'eglCreateWindowSurface' from incompatible pointer type
24[-Wincompatible-pointer-types]
25| 229 | surface = eglCreateWindowSurface(dpy, config, gs, NULL);
26| | ^~
27| | |
28| | struct
29gbm_surface *
30
31Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/demos/-/merge_requests/205]
32
33Signed-off-by: Wujian Sun <wujian.sun_1@nxp.com>
34---
35 src/egl/opengl/eglkms.c | 4 ++--
36 1 file changed, 2 insertions(+), 2 deletions(-)
37
38diff --git a/src/egl/opengl/eglkms.c b/src/egl/opengl/eglkms.c
39index 832962b..57adc7b 100644
40--- a/src/egl/opengl/eglkms.c
41+++ b/src/egl/opengl/eglkms.c
42@@ -187,7 +187,7 @@ int main(int argc, char *argv[])
43 goto close_fd;
44 }
45
46- dpy = eglGetDisplay(gbm);
47+ dpy = eglGetDisplay((EGLNativeDisplayType) gbm);
48 if (dpy == EGL_NO_DISPLAY) {
49 fprintf(stderr, "eglGetDisplay() failed\n");
50 ret = -1;
51@@ -226,7 +226,7 @@ int main(int argc, char *argv[])
52 gs = gbm_surface_create(gbm, kms.mode.hdisplay, kms.mode.vdisplay,
53 GBM_BO_FORMAT_XRGB8888,
54 GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
55- surface = eglCreateWindowSurface(dpy, config, gs, NULL);
56+ surface = eglCreateWindowSurface(dpy, config, (EGLNativeWindowType) gs, NULL);
57
58 if (!eglMakeCurrent(dpy, surface, surface, ctx)) {
59 fprintf(stderr, "failed to make context current\n");
diff --git a/recipes-graphics/mesa/mesa-demos/0001-egl-clear-backgrounds-black.patch b/recipes-graphics/mesa/mesa-demos/0001-egl-clear-backgrounds-black.patch
new file mode 100644
index 000000000..fb9091129
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-demos/0001-egl-clear-backgrounds-black.patch
@@ -0,0 +1,27 @@
1From f5a6600ff8312a7c0f30273ab783c1d822749a73 Mon Sep 17 00:00:00 2001
2From: Jiyu Yang <jiyu.yang@nxp.com>
3Date: Thu, 11 Apr 2024 16:30:50 +0800
4Subject: [PATCH] egl: clear backgrounds black
5
6if 50% translucency used, the application render result can vary
7depending on the format chosen, such as R10G10B10A2 or RGB24.
8
9Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/demos/-/merge_requests/174]
10Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
11---
12 src/egl/opengles2/es2gears.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/src/egl/opengles2/es2gears.c b/src/egl/opengles2/es2gears.c
16index 9501f61..e421a8a 100644
17--- a/src/egl/opengles2/es2gears.c
18+++ b/src/egl/opengles2/es2gears.c
19@@ -350,7 +350,7 @@ gears_draw(void)
20 GLfloat transform[16];
21 mat4_identity(transform);
22
23- glClearColor(0.0, 0.0, 0.0, 0.0);
24+ glClearColor(0.0, 0.0, 0.0, 1.0);
25 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
26
27 /* Translate and rotate the view */
diff --git a/recipes-graphics/mesa/mesa-demos/Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch b/recipes-graphics/mesa/mesa-demos/Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch
index 8401793cd..2e87ed155 100644
--- a/recipes-graphics/mesa/mesa-demos/Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch
+++ b/recipes-graphics/mesa/mesa-demos/Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch
@@ -1,4 +1,4 @@
1From 757649a766f90e745f24df1d191caeef15c71399 Mon Sep 17 00:00:00 2001 1From e453ac82b6ffd8f1d0de4c8ac8fd4bab6b924958 Mon Sep 17 00:00:00 2001
2From: Otavio Salvador <otavio@ossystems.com.br> 2From: Otavio Salvador <otavio@ossystems.com.br>
3Date: Tue, 4 Jun 2013 09:28:51 -0300 3Date: Tue, 4 Jun 2013 09:28:51 -0300
4Subject: [PATCH] Replace glWindowPos2iARB calls with glWindowPos2i 4Subject: [PATCH] Replace glWindowPos2iARB calls with glWindowPos2i
@@ -34,7 +34,7 @@ Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
34 20 files changed, 28 insertions(+), 28 deletions(-) 34 20 files changed, 28 insertions(+), 28 deletions(-)
35 35
36diff --git a/src/demos/copypix.c b/src/demos/copypix.c 36diff --git a/src/demos/copypix.c b/src/demos/copypix.c
37index 286c5a9..041b567 100644 37index 164d8c0..2d062a7 100644
38--- a/src/demos/copypix.c 38--- a/src/demos/copypix.c
39+++ b/src/demos/copypix.c 39+++ b/src/demos/copypix.c
40@@ -54,7 +54,7 @@ static void Display( void ) 40@@ -54,7 +54,7 @@ static void Display( void )
@@ -56,7 +56,7 @@ index 286c5a9..041b567 100644
56 glPixelZoom(1, 1); 56 glPixelZoom(1, 1);
57 57
58diff --git a/src/demos/engine.c b/src/demos/engine.c 58diff --git a/src/demos/engine.c b/src/demos/engine.c
59index 928fcbb..beace4c 100644 59index 410d889..b24638a 100644
60--- a/src/demos/engine.c 60--- a/src/demos/engine.c
61+++ b/src/demos/engine.c 61+++ b/src/demos/engine.c
62@@ -971,7 +971,7 @@ Draw(void) 62@@ -971,7 +971,7 @@ Draw(void)
@@ -69,7 +69,7 @@ index 928fcbb..beace4c 100644
69 if (lit) 69 if (lit)
70 glEnable(GL_LIGHTING); 70 glEnable(GL_LIGHTING);
71diff --git a/src/demos/fogcoord.c b/src/demos/fogcoord.c 71diff --git a/src/demos/fogcoord.c b/src/demos/fogcoord.c
72index 567eec0..e833009 100644 72index ea9a3ae..ed0483f 100644
73--- a/src/demos/fogcoord.c 73--- a/src/demos/fogcoord.c
74+++ b/src/demos/fogcoord.c 74+++ b/src/demos/fogcoord.c
75@@ -68,14 +68,14 @@ PrintInfo(void) 75@@ -68,14 +68,14 @@ PrintInfo(void)
@@ -90,7 +90,7 @@ index 567eec0..e833009 100644
90 } 90 }
91 91
92diff --git a/src/glsl/shadow_sampler.c b/src/glsl/shadow_sampler.c 92diff --git a/src/glsl/shadow_sampler.c b/src/glsl/shadow_sampler.c
93index b830030..eb82d8b 100644 93index 5f0f192..16a2201 100644
94--- a/src/glsl/shadow_sampler.c 94--- a/src/glsl/shadow_sampler.c
95+++ b/src/glsl/shadow_sampler.c 95+++ b/src/glsl/shadow_sampler.c
96@@ -85,7 +85,7 @@ Redisplay(void) 96@@ -85,7 +85,7 @@ Redisplay(void)
@@ -103,7 +103,7 @@ index b830030..eb82d8b 100644
103 103
104 { 104 {
105diff --git a/src/tests/auxbuffer.c b/src/tests/auxbuffer.c 105diff --git a/src/tests/auxbuffer.c b/src/tests/auxbuffer.c
106index 5fa399a..0cd5f47 100644 106index d4f7c2d..5ff1785 100644
107--- a/src/tests/auxbuffer.c 107--- a/src/tests/auxbuffer.c
108+++ b/src/tests/auxbuffer.c 108+++ b/src/tests/auxbuffer.c
109@@ -419,7 +419,7 @@ event_loop(Display *dpy, Window win) 109@@ -419,7 +419,7 @@ event_loop(Display *dpy, Window win)
@@ -116,7 +116,7 @@ index 5fa399a..0cd5f47 100644
116 glCopyPixels(0, 0, WinWidth, WinHeight, GL_COLOR); 116 glCopyPixels(0, 0, WinWidth, WinHeight, GL_COLOR);
117 glEnable(GL_DEPTH_TEST); 117 glEnable(GL_DEPTH_TEST);
118diff --git a/src/tests/copypixrate.c b/src/tests/copypixrate.c 118diff --git a/src/tests/copypixrate.c b/src/tests/copypixrate.c
119index 2f64e0a..df1f9b0 100644 119index 4c12fbd..e80f3cb 100644
120--- a/src/tests/copypixrate.c 120--- a/src/tests/copypixrate.c
121+++ b/src/tests/copypixrate.c 121+++ b/src/tests/copypixrate.c
122@@ -91,7 +91,7 @@ BlitOne(void) 122@@ -91,7 +91,7 @@ BlitOne(void)
@@ -129,7 +129,7 @@ index 2f64e0a..df1f9b0 100644
129 } 129 }
130 } 130 }
131diff --git a/src/tests/drawbuffers.c b/src/tests/drawbuffers.c 131diff --git a/src/tests/drawbuffers.c b/src/tests/drawbuffers.c
132index fa2f8a7..cd5033f 100644 132index f017d25..36b241f 100644
133--- a/src/tests/drawbuffers.c 133--- a/src/tests/drawbuffers.c
134+++ b/src/tests/drawbuffers.c 134+++ b/src/tests/drawbuffers.c
135@@ -88,7 +88,7 @@ Display(void) 135@@ -88,7 +88,7 @@ Display(void)
@@ -142,7 +142,7 @@ index fa2f8a7..cd5033f 100644
142 142
143 free(buffer); 143 free(buffer);
144diff --git a/src/tests/drawbuffers2.c b/src/tests/drawbuffers2.c 144diff --git a/src/tests/drawbuffers2.c b/src/tests/drawbuffers2.c
145index 5bcf0b2..84d444b 100644 145index 0cb8d47..ac1a5aa 100644
146--- a/src/tests/drawbuffers2.c 146--- a/src/tests/drawbuffers2.c
147+++ b/src/tests/drawbuffers2.c 147+++ b/src/tests/drawbuffers2.c
148@@ -112,7 +112,7 @@ Display(void) 148@@ -112,7 +112,7 @@ Display(void)
@@ -155,7 +155,7 @@ index 5bcf0b2..84d444b 100644
155 155
156 free(buffer); 156 free(buffer);
157diff --git a/src/tests/fbotest1.c b/src/tests/fbotest1.c 157diff --git a/src/tests/fbotest1.c b/src/tests/fbotest1.c
158index 161903c..5930a6d 100644 158index 322ea30..19082b6 100644
159--- a/src/tests/fbotest1.c 159--- a/src/tests/fbotest1.c
160+++ b/src/tests/fbotest1.c 160+++ b/src/tests/fbotest1.c
161@@ -61,7 +61,7 @@ Display( void ) 161@@ -61,7 +61,7 @@ Display( void )
@@ -168,7 +168,7 @@ index 161903c..5930a6d 100644
168 168
169 free(buffer); 169 free(buffer);
170diff --git a/src/tests/fbotest2.c b/src/tests/fbotest2.c 170diff --git a/src/tests/fbotest2.c b/src/tests/fbotest2.c
171index 6ef7f12..11c867e 100644 171index 05554e4..e6a6c29 100644
172--- a/src/tests/fbotest2.c 172--- a/src/tests/fbotest2.c
173+++ b/src/tests/fbotest2.c 173+++ b/src/tests/fbotest2.c
174@@ -72,7 +72,7 @@ Display( void ) 174@@ -72,7 +72,7 @@ Display( void )
@@ -190,7 +190,7 @@ index 6ef7f12..11c867e 100644
190 190
191 free(buffer); 191 free(buffer);
192diff --git a/src/tests/fbotest3.c b/src/tests/fbotest3.c 192diff --git a/src/tests/fbotest3.c b/src/tests/fbotest3.c
193index 19f684d..e6d7710 100644 193index a3ac340..c320794 100644
194--- a/src/tests/fbotest3.c 194--- a/src/tests/fbotest3.c
195+++ b/src/tests/fbotest3.c 195+++ b/src/tests/fbotest3.c
196@@ -79,7 +79,7 @@ Display( void ) 196@@ -79,7 +79,7 @@ Display( void )
@@ -203,7 +203,7 @@ index 19f684d..e6d7710 100644
203 203
204 free(buffer); 204 free(buffer);
205diff --git a/src/tests/readrate.c b/src/tests/readrate.c 205diff --git a/src/tests/readrate.c b/src/tests/readrate.c
206index 3859cf4..81eb8a3 100644 206index 8a9a02f..9709835 100644
207--- a/src/tests/readrate.c 207--- a/src/tests/readrate.c
208+++ b/src/tests/readrate.c 208+++ b/src/tests/readrate.c
209@@ -85,7 +85,7 @@ MeasureFormat(struct format_type *fmt, GLint width, GLint height, GLuint pbo) 209@@ -85,7 +85,7 @@ MeasureFormat(struct format_type *fmt, GLint width, GLint height, GLuint pbo)
@@ -242,7 +242,7 @@ index 3859cf4..81eb8a3 100644
242 } 242 }
243 243
244diff --git a/src/tests/viewmemory.c b/src/tests/viewmemory.c 244diff --git a/src/tests/viewmemory.c b/src/tests/viewmemory.c
245index 16044b9..3584c33 100644 245index 16054b6..ff7b4eb 100644
246--- a/src/tests/viewmemory.c 246--- a/src/tests/viewmemory.c
247+++ b/src/tests/viewmemory.c 247+++ b/src/tests/viewmemory.c
248@@ -95,7 +95,7 @@ Draw(void) 248@@ -95,7 +95,7 @@ Draw(void)
@@ -255,7 +255,7 @@ index 16044b9..3584c33 100644
255 255
256 glutSwapBuffers(); 256 glutSwapBuffers();
257diff --git a/src/trivial/clear-fbo-scissor.c b/src/trivial/clear-fbo-scissor.c 257diff --git a/src/trivial/clear-fbo-scissor.c b/src/trivial/clear-fbo-scissor.c
258index a30935c..5c15200 100644 258index 2d1ee4f..6d06330 100644
259--- a/src/trivial/clear-fbo-scissor.c 259--- a/src/trivial/clear-fbo-scissor.c
260+++ b/src/trivial/clear-fbo-scissor.c 260+++ b/src/trivial/clear-fbo-scissor.c
261@@ -182,7 +182,7 @@ Draw(void) 261@@ -182,7 +182,7 @@ Draw(void)
@@ -268,7 +268,7 @@ index a30935c..5c15200 100644
268 268
269 free(buffer); 269 free(buffer);
270diff --git a/src/trivial/clear-fbo-tex.c b/src/trivial/clear-fbo-tex.c 270diff --git a/src/trivial/clear-fbo-tex.c b/src/trivial/clear-fbo-tex.c
271index de84f98..f0fbdf6 100644 271index 94534bd..6a38c4b 100644
272--- a/src/trivial/clear-fbo-tex.c 272--- a/src/trivial/clear-fbo-tex.c
273+++ b/src/trivial/clear-fbo-tex.c 273+++ b/src/trivial/clear-fbo-tex.c
274@@ -140,7 +140,7 @@ static void Draw( void ) 274@@ -140,7 +140,7 @@ static void Draw( void )
@@ -281,7 +281,7 @@ index de84f98..f0fbdf6 100644
281 281
282 free(buffer); 282 free(buffer);
283diff --git a/src/trivial/clear-fbo.c b/src/trivial/clear-fbo.c 283diff --git a/src/trivial/clear-fbo.c b/src/trivial/clear-fbo.c
284index 10d830b..3fee3e3 100644 284index 2065836..ad39401 100644
285--- a/src/trivial/clear-fbo.c 285--- a/src/trivial/clear-fbo.c
286+++ b/src/trivial/clear-fbo.c 286+++ b/src/trivial/clear-fbo.c
287@@ -116,7 +116,7 @@ Draw(void) 287@@ -116,7 +116,7 @@ Draw(void)
@@ -294,7 +294,7 @@ index 10d830b..3fee3e3 100644
294 294
295 free(buffer); 295 free(buffer);
296diff --git a/src/trivial/readpixels.c b/src/trivial/readpixels.c 296diff --git a/src/trivial/readpixels.c b/src/trivial/readpixels.c
297index ccce4ed..74e0546 100644 297index fb88570..da9030e 100644
298--- a/src/trivial/readpixels.c 298--- a/src/trivial/readpixels.c
299+++ b/src/trivial/readpixels.c 299+++ b/src/trivial/readpixels.c
300@@ -71,7 +71,7 @@ static void Draw(void) 300@@ -71,7 +71,7 @@ static void Draw(void)
@@ -307,7 +307,7 @@ index ccce4ed..74e0546 100644
307 glDrawPixels(Width, Height, GL_RGBA, GL_FLOAT, image); 307 glDrawPixels(Width, Height, GL_RGBA, GL_FLOAT, image);
308 free(image); 308 free(image);
309diff --git a/src/trivial/tri-fbo.c b/src/trivial/tri-fbo.c 309diff --git a/src/trivial/tri-fbo.c b/src/trivial/tri-fbo.c
310index d5800b2..dd1f21a 100644 310index 76985a9..21c0ec0 100644
311--- a/src/trivial/tri-fbo.c 311--- a/src/trivial/tri-fbo.c
312+++ b/src/trivial/tri-fbo.c 312+++ b/src/trivial/tri-fbo.c
313@@ -119,7 +119,7 @@ static void Draw( void ) 313@@ -119,7 +119,7 @@ static void Draw( void )
@@ -320,7 +320,7 @@ index d5800b2..dd1f21a 100644
320 320
321 321
322diff --git a/src/xdemos/glxsnoop.c b/src/xdemos/glxsnoop.c 322diff --git a/src/xdemos/glxsnoop.c b/src/xdemos/glxsnoop.c
323index 2215cfd..13d2b2d 100644 323index 294297a..abb32a8 100644
324--- a/src/xdemos/glxsnoop.c 324--- a/src/xdemos/glxsnoop.c
325+++ b/src/xdemos/glxsnoop.c 325+++ b/src/xdemos/glxsnoop.c
326@@ -91,7 +91,7 @@ redraw(Display *dpy, Window srcWin, Window dstWin ) 326@@ -91,7 +91,7 @@ redraw(Display *dpy, Window srcWin, Window dstWin )
@@ -350,6 +350,3 @@ index f670983..d010085 100644
350 glCopyPixels(0, 0, Width[0], Height[0], GL_COLOR); 350 glCopyPixels(0, 0, Width[0], Height[0], GL_COLOR);
351 } 351 }
352 352
353--
3541.8.1
355
diff --git a/recipes-graphics/mesa/mesa-demos/fix-clear-build-break.patch b/recipes-graphics/mesa/mesa-demos/fix-clear-build-break.patch
index 459a6ebd4..17fb208c9 100644
--- a/recipes-graphics/mesa/mesa-demos/fix-clear-build-break.patch
+++ b/recipes-graphics/mesa/mesa-demos/fix-clear-build-break.patch
@@ -1,10 +1,18 @@
1mesa-demos: Add extension header to fix build break now that gl1 is removed 1From d152655a1421f0cdf7ce22c35a36c367c07af587 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 26 Aug 2014 14:44:17 -0500
4Subject: [PATCH] mesa-demos: Add extension header to fix build break now that
5 gl1 is removed
2 6
3Upstream-Status: Pending 7Upstream-Status: Pending
4 8
5Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 src/egl/opengles1/clear.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
6diff --git a/src/egl/opengles1/clear.c b/src/egl/opengles1/clear.c 14diff --git a/src/egl/opengles1/clear.c b/src/egl/opengles1/clear.c
7index 9fe1b5291e1905fd6fe572063ed707d59ce45a81..ca9954a21b5f475709dbdef07f90b900962fcbc7 100644 15index 9fe1b52..ca9954a 100644
8--- a/src/egl/opengles1/clear.c 16--- a/src/egl/opengles1/clear.c
9+++ b/src/egl/opengles1/clear.c 17+++ b/src/egl/opengles1/clear.c
10@@ -34,7 +34,7 @@ 18@@ -34,7 +34,7 @@
diff --git a/recipes-graphics/mesa/mesa-demos_%.bbappend b/recipes-graphics/mesa/mesa-demos_%.bbappend
index ff5d71ae1..7d3e7ca1c 100644
--- a/recipes-graphics/mesa/mesa-demos_%.bbappend
+++ b/recipes-graphics/mesa/mesa-demos_%.bbappend
@@ -2,7 +2,10 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
2 2
3SRC_URI:append:imxgpu = " \ 3SRC_URI:append:imxgpu = " \
4 file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ 4 file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \
5 file://fix-clear-build-break.patch" 5 file://fix-clear-build-break.patch \
6 file://0001-egl-clear-backgrounds-black.patch \
7 file://0001-YOCIMX-8300-Fix-mesa-demos-build-break-on-GCC-14.patch \
8"
6 9
7REQUIRED_DISTRO_FEATURES:remove:imxgpu = "x11" 10REQUIRED_DISTRO_FEATURES:remove:imxgpu = "x11"
8 11
diff --git a/recipes-graphics/mesa/mesa-etnaviv-env_0.1.bb b/recipes-graphics/mesa/mesa-etnaviv-env_0.1.bb
index 87d05365c..23af68280 100644
--- a/recipes-graphics/mesa/mesa-etnaviv-env_0.1.bb
+++ b/recipes-graphics/mesa/mesa-etnaviv-env_0.1.bb
@@ -9,6 +9,8 @@ SRC_URI = "\
9 file://mesa-etnaviv.sh \ 9 file://mesa-etnaviv.sh \
10" 10"
11 11
12S = "${UNPACKDIR}"
13
12do_configure[noexec] = "1" 14do_configure[noexec] = "1"
13do_compile[noexec] = "1" 15do_compile[noexec] = "1"
14 16
@@ -17,13 +19,13 @@ do_install:use-mainline-bsp() {
17 19
18 # systemd 20 # systemd
19 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then 21 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
20 install -D -m 644 ${WORKDIR}/mesa-etnaviv.conf \ 22 install -D -m 644 ${UNPACKDIR}/mesa-etnaviv.conf \
21 ${D}${sysconfdir}/systemd/system.conf.d/mesa-etnaviv.conf 23 ${D}${sysconfdir}/systemd/system.conf.d/mesa-etnaviv.conf
22 fi 24 fi
23 25
24 # sysvinit 26 # sysvinit
25 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 27 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
26 install -D -m 644 ${WORKDIR}/mesa-etnaviv.sh \ 28 install -D -m 644 ${UNPACKDIR}/mesa-etnaviv.sh \
27 ${D}${sysconfdir}/profile.d/mesa-etnaviv.sh 29 ${D}${sysconfdir}/profile.d/mesa-etnaviv.sh
28 fi 30 fi
29} 31}
diff --git a/recipes-graphics/mesa/mesa-gl_%.bbappend b/recipes-graphics/mesa/mesa-gl.bbappend
index 6545571fa..6545571fa 100644
--- a/recipes-graphics/mesa/mesa-gl_%.bbappend
+++ b/recipes-graphics/mesa/mesa-gl.bbappend
diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa.bbappend
index acddfbc66..120561d19 100644
--- a/recipes-graphics/mesa/mesa_%.bbappend
+++ b/recipes-graphics/mesa/mesa.bbappend
@@ -1,6 +1,10 @@
1PROVIDES:remove:imxgpu = "virtual/egl" 1PROVIDES:remove:imxgpu = "virtual/egl"
2PROVIDES:remove:imxgpu3d = "virtual/libgl virtual/libgles1 virtual/libgles2" 2PROVIDES:remove:imxgpu3d = "virtual/libgl virtual/libgles1 virtual/libgles2"
3 3
4FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
5SRC_URI:append:mx93-nxp-bsp = " file://0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch"
6SRC_URI:append:imx-nxp-bsp = " file://0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch"
7
4PACKAGECONFIG:remove:imxgpu = "egl gbm" 8PACKAGECONFIG:remove:imxgpu = "egl gbm"
5PACKAGECONFIG:remove:imxgpu3d = "gles" 9PACKAGECONFIG:remove:imxgpu3d = "gles"
6 10
@@ -15,7 +19,7 @@ python () {
15} 19}
16 20
17# Enable Etnaviv and Freedreno support 21# Enable Etnaviv and Freedreno support
18PACKAGECONFIG:append:use-mainline-bsp = " gallium etnaviv kmsro freedreno" 22PACKAGECONFIG:append:use-mainline-bsp = " gallium etnaviv freedreno"
19 23
20# For NXP BSP, GPU drivers don't support dri 24# For NXP BSP, GPU drivers don't support dri
21PACKAGECONFIG:remove:imxgpu:use-nxp-bsp = "dri" 25PACKAGECONFIG:remove:imxgpu:use-nxp-bsp = "dri"
diff --git a/recipes-graphics/mesa/mesa/0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch b/recipes-graphics/mesa/mesa/0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch
new file mode 100644
index 000000000..3dc8db099
--- /dev/null
+++ b/recipes-graphics/mesa/mesa/0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch
@@ -0,0 +1,47 @@
1From 612c3dc98d5d050b9cfee16ec77ca3c8358caa0d Mon Sep 17 00:00:00 2001
2From: Wujian Sun <wujian.sun_1@nxp.com>
3Date: Mon, 29 Apr 2024 17:29:16 +0800
4Subject: [PATCH] MGS-7599 cso: fix virgl driver assert issue
5
6A workaround that remove PIPE_MAX_SAMPLERS and
7PIPE_MAX_CONSTANT_BUFFERS assert.
8
9Upstream-Status: Inappropriate [i.MX-specific]
10
11Signed-off-by: Wujian Sun <wujian.sun_1@nxp.com>
12---
13 src/gallium/auxiliary/cso_cache/cso_context.c | 2 --
14 src/gallium/drivers/virgl/virgl_screen.c | 2 +-
15 2 files changed, 1 insertion(+), 3 deletions(-)
16
17diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
18index 3e86def31c5..ffc6d22da9c 100644
19--- a/src/gallium/auxiliary/cso_cache/cso_context.c
20+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
21@@ -403,10 +403,8 @@ cso_unbind_context(struct cso_context *ctx)
22 PIPE_SHADER_CAP_MAX_CONST_BUFFERS);
23 int maximg = scr->get_shader_param(scr, sh,
24 PIPE_SHADER_CAP_MAX_SHADER_IMAGES);
25- assert(maxsam <= PIPE_MAX_SAMPLERS);
26 assert(maxview <= PIPE_MAX_SHADER_SAMPLER_VIEWS);
27 assert(maxssbo <= PIPE_MAX_SHADER_BUFFERS);
28- assert(maxcb <= PIPE_MAX_CONSTANT_BUFFERS);
29 assert(maximg <= PIPE_MAX_SHADER_IMAGES);
30 if (maxsam > 0) {
31 ctx->base.pipe->bind_sampler_states(ctx->base.pipe, sh, 0, maxsam, zeros);
32diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
33index 389a1935cc3..7c7f8ba576b 100644
34--- a/src/gallium/drivers/virgl/virgl_screen.c
35+++ b/src/gallium/drivers/virgl/virgl_screen.c
36@@ -435,7 +435,7 @@ virgl_get_shader_param(struct pipe_screen *screen,
37 return 1;
38 case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
39 return MIN2(vscreen->caps.caps.v2.max_shader_sampler_views,
40- PIPE_MAX_SHADER_SAMPLER_VIEWS);
41+ PIPE_MAX_SAMPLERS);
42 case PIPE_SHADER_CAP_INTEGERS:
43 return vscreen->caps.caps.v1.glsl_level >= 130;
44 case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
45--
462.17.1
47
diff --git a/recipes-graphics/mesa/mesa/0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch b/recipes-graphics/mesa/mesa/0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch
new file mode 100644
index 000000000..0cdcbfca6
--- /dev/null
+++ b/recipes-graphics/mesa/mesa/0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch
@@ -0,0 +1,33 @@
1From 188d7b01037e5a0249e63c2600cf15a288a9ff3f Mon Sep 17 00:00:00 2001
2From: Wujian Sun <wujian.sun_1@nxp.com>
3Date: Fri, 19 Apr 2024 18:38:17 +0800
4Subject: [PATCH] MGS-7673 egl/dri2: fix video showing wrong frame
5
6Softpipe driver doesn't support EGL_EXT_image_dma_buf_import_modifiers
7extension.
8Should not report the extension.
9
10Upstream-Status: Pending
11
12Signed-off-by: Wujian Sun <wujian.sun_1@nxp.com>
13---
14 src/egl/drivers/dri2/egl_dri2.c | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
18index 992f0e3d46d..6ee209d4b47 100644
19--- a/src/egl/drivers/dri2/egl_dri2.c
20+++ b/src/egl/drivers/dri2/egl_dri2.c
21@@ -942,7 +942,8 @@ dri2_setup_screen(_EGLDisplay *disp)
22
23 #ifdef HAVE_LIBDRM
24 if (dri2_dpy->image->base.version >= 8 &&
25- dri2_dpy->image->createImageFromDmaBufs) {
26+ dri2_dpy->image->createImageFromDmaBufs &&
27+ strcmp("softpipe", pscreen->get_name(pscreen))) {
28 disp->Extensions.EXT_image_dma_buf_import = EGL_TRUE;
29 disp->Extensions.EXT_image_dma_buf_import_modifiers = EGL_TRUE;
30 }
31--
322.17.1
33