diff options
Diffstat (limited to 'poky/meta/recipes-graphics/mesa')
-rw-r--r-- | poky/meta/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch | 34 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch | 65 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch | 14 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch | 81 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/mesa/libglu/0001-Remove-deprecated-register-in-C-17.patch | 32 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/mesa/libglu_9.0.2.bb | 4 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/mesa/mesa-gl_22.3.3.bb (renamed from poky/meta/recipes-graphics/mesa/mesa-gl_22.2.3.bb) | 2 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/mesa/mesa.inc | 10 | ||||
-rw-r--r-- | poky/meta/recipes-graphics/mesa/mesa_22.3.3.bb (renamed from poky/meta/recipes-graphics/mesa/mesa_22.2.3.bb) | 0 |
9 files changed, 137 insertions, 105 deletions
diff --git a/poky/meta/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch b/poky/meta/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch deleted file mode 100644 index e7d92197be..0000000000 --- a/poky/meta/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 859bfc342d1db9b61c43f30d9aa27cea35ca7599 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 16 Oct 2020 11:03:47 -0700 -Subject: [PATCH] futex.h: Define __NR_futex if it does not exist - -__NR_futex is not defines by newer architectures e.g. arc, riscv32 as -they only have 64bit variant of time_t. Glibc defines SYS_futex interface based on -__NR_futex, since this is used in applications, such applications start -to fail to build for these newer architectures. This patch defines a -fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps -working - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - src/util/futex.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/util/futex.h b/src/util/futex.h -index 2a2a00c..92fc123 100644 ---- a/src/util/futex.h -+++ b/src/util/futex.h -@@ -38,6 +38,10 @@ - #define SYS_futex SYS_futex_time64 - #endif - -+#if !defined(SYS_futex) && defined(SYS_futex_time64) -+# define SYS_futex SYS_futex_time64 -+#endif -+ - static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3) - { - return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3); diff --git a/poky/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/poky/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch new file mode 100644 index 0000000000..6541671b7a --- /dev/null +++ b/poky/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch @@ -0,0 +1,65 @@ +From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001 +From: Vincent Davis Jr <vince@underview.tech> +Date: Wed, 28 Dec 2022 16:28:01 -0600 +Subject: [PATCH] gbm/backend: fix gbm compile without dri + +Upstream-Status: Backport + +https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447 +https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60 + +At mesa version 22.2.3 patch wasn't introduced until after. + +Commit introduces a fix that allows for gbm to be built with an empty +backend. There are situation especially in a Yocto/OE cross compilation +environment where you want to build with an empty backend. The particular +situation is as such: + +The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl, +virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build +errors such as: + +| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend': +| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend' +| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4): + undefined reference to `gbm_dri_backend' +| collect2: error: ld returned 1 exit status + +Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled + +Add fix to bypasses compilation issue by excluding gbm dri backend. If +HAVE_DRI || HAVE_DRIX not specified. + +Acked-by: David Heidelberg <david.heidelberg@collabora.com> +Signed-off-by: Vincent Davis Jr <vince@underview.tech> +--- + src/gbm/main/backend.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c +index 974d0a76a4e..feee0703495 100644 +--- a/src/gbm/main/backend.c ++++ b/src/gbm/main/backend.c +@@ -42,7 +42,9 @@ + #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) + #define VER_MIN(a, b) ((a) < (b) ? (a) : (b)) + ++#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3) + extern const struct gbm_backend gbm_dri_backend; ++#endif + + struct gbm_backend_desc { + const char *name; +@@ -51,7 +53,9 @@ struct gbm_backend_desc { + }; + + static const struct gbm_backend_desc builtin_backends[] = { ++#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3) + { "dri", &gbm_dri_backend }, ++#endif + }; + + #define BACKEND_LIB_SUFFIX "_gbm" +-- +2.34.1 + diff --git a/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch index ec263ce479..36c33f889b 100644 --- a/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch +++ b/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch @@ -1,4 +1,4 @@ -From d092a9000da62dfccca5b58fca56b94eb9989c48 Mon Sep 17 00:00:00 2001 +From 3b4d6b89f644b43e507c08181fef06db4326f9da Mon Sep 17 00:00:00 2001 From: Alistair Francis <alistair@alistair23.me> Date: Thu, 14 Nov 2019 13:04:49 -0800 Subject: [PATCH] meson.build: check for all linux host_os combinations @@ -20,19 +20,19 @@ Signed-off-by: Alistair Francis <alistair@alistair23.me> 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build -index 250b528..b5c98f8 100644 +index 172c64a..9b5294c 100644 --- a/meson.build +++ b/meson.build @@ -173,7 +173,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 # Only build shared_glapi if at least one OpenGL API is enabled with_shared_glapi = with_shared_glapi and with_any_opengl --system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos'].contains(host_machine.system()) -+system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux') +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system()) ++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system()) or host_machine.system().startswith('linux') - dri_drivers = get_option('dri-drivers') - if dri_drivers.length() != 0 -@@ -1091,7 +1091,7 @@ if cc.has_function('reallocarray') + with_freedreno_kgsl = get_option('freedreno-kgsl') + if with_freedreno_kgsl +@@ -1076,7 +1076,7 @@ if cc.has_function('reallocarray') endif # TODO: this is very incomplete diff --git a/poky/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch b/poky/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch index 7989843eb4..1cf23492fe 100644 --- a/poky/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch +++ b/poky/meta/recipes-graphics/mesa/files/0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch @@ -1,67 +1,36 @@ -From da6e47f1717f34c73de388c56ffaf4861a07fdc5 Mon Sep 17 00:00:00 2001 -From: t bettler <thomas.bettler@gmail.com> -Date: Sat, 9 Jul 2022 09:28:51 +0000 +From 267dd1f4d571ee606141aa66f1665aa152b4e911 Mon Sep 17 00:00:00 2001 +From: t0b3 <thomas.bettler@gmail.com> +Date: Sat, 10 Dec 2022 14:32:53 +0100 Subject: [PATCH] nir/nir_opt_move: fix ALWAYS_INLINE compiler error -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -Backport merge request to fix mesa compile error when debug build -enabled. - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439] - -Signed-off-by: Kai Kang <kai.kang@windriver.com> - -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -fix call to ‘always_inline’ ‘src_is_ssa’ - -Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6825 -Fixes: f1d20ec67c3f186886b97de94f74484650f8fda1 ("nir/nir_opt_move: handle non-SSA defs ") +Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> +Reviewed-by: Adam Jackson <ajax@redhat.com> +Closes: #6825 +Fixes: f1d20ec6 ("nir/nir_opt_move: handle non-SSA defs ") +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439> +Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/commit/267dd1f4d571ee606141aa66f1665aa152b4e911] --- - src/compiler/nir/nir_inline_helpers.h | 10 ++++++++-- - src/compiler/nir/nir_opt_move.c | 2 +- - 2 files changed, 9 insertions(+), 3 deletions(-) + src/compiler/nir/nir_opt_move.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/src/compiler/nir/nir_inline_helpers.h b/src/compiler/nir/nir_inline_helpers.h -index 125dd8a..ec33f05 100644 ---- a/src/compiler/nir/nir_inline_helpers.h -+++ b/src/compiler/nir/nir_inline_helpers.h -@@ -73,8 +73,8 @@ nir_foreach_dest(nir_instr *instr, nir_foreach_dest_cb cb, void *state) - return _nir_foreach_dest(instr, cb, state); - } - --static inline bool --nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) -+static ALWAYS_INLINE bool -+_nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) - { - switch (instr->type) { - case nir_instr_type_alu: { -@@ -162,3 +162,9 @@ nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) - dest_state.cb = cb; - return _nir_foreach_dest(instr, _nir_visit_dest_indirect, &dest_state); - } -+ -+static inline bool -+nir_foreach_src(nir_instr *instr, nir_foreach_src_cb cb, void *state) -+{ -+ return _nir_foreach_src(instr, cb, state); -+} diff --git a/src/compiler/nir/nir_opt_move.c b/src/compiler/nir/nir_opt_move.c -index 81bcde5..051c3cc 100644 +index 81bcde5c436..9aeb9f4cf86 100644 --- a/src/compiler/nir/nir_opt_move.c +++ b/src/compiler/nir/nir_opt_move.c -@@ -60,7 +60,7 @@ src_is_ssa(nir_src *src, void *state) - static ALWAYS_INLINE bool - instr_reads_register(nir_instr *instr) +@@ -51,13 +51,13 @@ + * lower register pressure. + */ + +-static ALWAYS_INLINE bool ++static inline bool + src_is_ssa(nir_src *src, void *state) { -- return !nir_foreach_src(instr, src_is_ssa, NULL); -+ return !_nir_foreach_src(instr, src_is_ssa, NULL); + return src->is_ssa; } - static bool +-static ALWAYS_INLINE bool ++static inline bool + instr_reads_register(nir_instr *instr) + { + return !nir_foreach_src(instr, src_is_ssa, NULL); diff --git a/poky/meta/recipes-graphics/mesa/libglu/0001-Remove-deprecated-register-in-C-17.patch b/poky/meta/recipes-graphics/mesa/libglu/0001-Remove-deprecated-register-in-C-17.patch new file mode 100644 index 0000000000..95d56e9573 --- /dev/null +++ b/poky/meta/recipes-graphics/mesa/libglu/0001-Remove-deprecated-register-in-C-17.patch @@ -0,0 +1,32 @@ +From 1910b3a83a7e5aa1a31c4325829c94134fafce76 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 13 Jan 2023 20:58:07 -0800 +Subject: [PATCH] Remove deprecated register in C++17 + +Fixes errors like + +src/libnurbs/internals/varray.cc:76:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] + register long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]); + ^~~~~~~~~ + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/glu/-/merge_requests/10] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/libnurbs/internals/varray.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/libnurbs/internals/varray.cc b/src/libnurbs/internals/varray.cc +index 1cb2354..41b3b18 100644 +--- a/src/libnurbs/internals/varray.cc ++++ b/src/libnurbs/internals/varray.cc +@@ -73,8 +73,8 @@ Varray::~Varray( void ) + inline void + Varray::update( Arc_ptr arc, long dir[2], REAL val ) + { +- register long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]); +- register long dt = sgn(arc->tail()[1] - arc->prev->tail()[1]); ++ long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]); ++ long dt = sgn(arc->tail()[1] - arc->prev->tail()[1]); + + if( dir[0] != ds || dir[1] != dt ) { + dir[0] = ds; diff --git a/poky/meta/recipes-graphics/mesa/libglu_9.0.2.bb b/poky/meta/recipes-graphics/mesa/libglu_9.0.2.bb index 0d27dd116b..525d631611 100644 --- a/poky/meta/recipes-graphics/mesa/libglu_9.0.2.bb +++ b/poky/meta/recipes-graphics/mesa/libglu_9.0.2.bb @@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://include/GL/glu.h;endline=29;md5=6b79c570f644363b35645 # Epoch as this used to be part of mesa PE = "2" -SRC_URI = "https://mesa.freedesktop.org/archive/glu/glu-${PV}.tar.gz" +SRC_URI = "https://mesa.freedesktop.org/archive/glu/glu-${PV}.tar.gz \ + file://0001-Remove-deprecated-register-in-C-17.patch \ + " SRC_URI[sha256sum] = "24effdfb952453cc00e275e1c82ca9787506aba0282145fff054498e60e19a65" diff --git a/poky/meta/recipes-graphics/mesa/mesa-gl_22.2.3.bb b/poky/meta/recipes-graphics/mesa/mesa-gl_22.3.3.bb index c7c7aa7ac3..ca160f1bfc 100644 --- a/poky/meta/recipes-graphics/mesa/mesa-gl_22.2.3.bb +++ b/poky/meta/recipes-graphics/mesa/mesa-gl_22.3.3.bb @@ -6,6 +6,8 @@ PROVIDES = "virtual/libgl virtual/mesa" S = "${WORKDIR}/mesa-${PV}" +TARGET_CFLAGS = "-I${STAGING_INCDIR}/drm" + # At least one DRI rendering engine is required to build mesa. # When no X11 is available, use osmesa for the rendering engine. PACKAGECONFIG ??= "opengl gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}" diff --git a/poky/meta/recipes-graphics/mesa/mesa.inc b/poky/meta/recipes-graphics/mesa/mesa.inc index 77aa97069a..0ec681cf20 100644 --- a/poky/meta/recipes-graphics/mesa/mesa.inc +++ b/poky/meta/recipes-graphics/mesa/mesa.inc @@ -17,15 +17,12 @@ PE = "2" SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ - file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \ file://0001-util-format-Check-for-NEON-before-using-it.patch \ - ${NATIVE_PATCHES} \ + file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \ + file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch \ " -NATIVE_PATCHES ?= "" -# required by mesa-native on Ubuntu 18.04 with gcc 7.5 when DEBUG_BUILD enabled -NATIVE_PATCHES:class-native = "file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch" -SRC_URI[sha256sum] = "ee7d026f7b1991dbae0861d359b671145c3a86f2a731353b885d2ea2d5c098d6" +SRC_URI[sha256sum] = "bed799788bf2bd9ef079d97cd8e09348bf53cb086818578e40773b2b17812922" UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" @@ -97,7 +94,6 @@ PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled" X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr" # "x11" requires "opengl" PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}" -PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=enabled,-Dgallium-xvmc=disabled,libxvmc" PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence" diff --git a/poky/meta/recipes-graphics/mesa/mesa_22.2.3.bb b/poky/meta/recipes-graphics/mesa/mesa_22.3.3.bb index 96e8aa38d6..96e8aa38d6 100644 --- a/poky/meta/recipes-graphics/mesa/mesa_22.2.3.bb +++ b/poky/meta/recipes-graphics/mesa/mesa_22.3.3.bb |