summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/mesa/mesa-demos/0001-YOCIMX-8300-Fix-mesa-demos-build-break-on-GCC-14.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/mesa/mesa-demos/0001-YOCIMX-8300-Fix-mesa-demos-build-break-on-GCC-14.patch')
-rw-r--r--recipes-graphics/mesa/mesa-demos/0001-YOCIMX-8300-Fix-mesa-demos-build-break-on-GCC-14.patch59
1 files changed, 59 insertions, 0 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");