summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch65
1 files changed, 0 insertions, 65 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
deleted file mode 100644
index 6541671b7a..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001
2From: Vincent Davis Jr <vince@underview.tech>
3Date: Wed, 28 Dec 2022 16:28:01 -0600
4Subject: [PATCH] gbm/backend: fix gbm compile without dri
5
6Upstream-Status: Backport
7
8https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
9https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60
10
11At mesa version 22.2.3 patch wasn't introduced until after.
12
13Commit introduces a fix that allows for gbm to be built with an empty
14backend. There are situation especially in a Yocto/OE cross compilation
15environment where you want to build with an empty backend. The particular
16situation is as such:
17
18The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl,
19virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build
20errors such as:
21
22| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend':
23| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend'
24| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
25 undefined reference to `gbm_dri_backend'
26| collect2: error: ld returned 1 exit status
27
28Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled
29
30Add fix to bypasses compilation issue by excluding gbm dri backend. If
31HAVE_DRI || HAVE_DRIX not specified.
32
33Acked-by: David Heidelberg <david.heidelberg@collabora.com>
34Signed-off-by: Vincent Davis Jr <vince@underview.tech>
35---
36 src/gbm/main/backend.c | 4 ++++
37 1 file changed, 4 insertions(+)
38
39diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
40index 974d0a76a4e..feee0703495 100644
41--- a/src/gbm/main/backend.c
42+++ b/src/gbm/main/backend.c
43@@ -42,7 +42,9 @@
44 #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
45 #define VER_MIN(a, b) ((a) < (b) ? (a) : (b))
46
47+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
48 extern const struct gbm_backend gbm_dri_backend;
49+#endif
50
51 struct gbm_backend_desc {
52 const char *name;
53@@ -51,7 +53,9 @@ struct gbm_backend_desc {
54 };
55
56 static const struct gbm_backend_desc builtin_backends[] = {
57+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
58 { "dri", &gbm_dri_backend },
59+#endif
60 };
61
62 #define BACKEND_LIB_SUFFIX "_gbm"
63--
642.34.1
65