Skip to content

Commit 22c0a62

Browse files
author
Markus Bauer
committed
mesa: pull up to version 21.3.7 from upstream for panfrost support
1 parent ddce4b2 commit 22c0a62

12 files changed

Lines changed: 231 additions & 163 deletions
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build
2+
index 2d232e51b3c27d4b421a087bdbbd2e84dbc2fbeb..f4d61f7b254086f2bcfba117a2024efa926c973b 100644
3+
--- a/src/gallium/targets/dri/meson.build
4+
+++ b/src/gallium/targets/dri/meson.build
5+
@@ -83,6 +83,7 @@ foreach d : [[with_gallium_kmsro, [
6+
'mi0283qt_dri.so',
7+
'mxsfb-drm_dri.so',
8+
'pl111_dri.so',
9+
+ 'rcar-du_dri.so',
10+
'repaper_dri.so',
11+
'rockchip_dri.so',
12+
'st7586_dri.so',
13+
diff --git a/src/gallium/targets/dri/target.c b/src/gallium/targets/dri/target.c
14+
index 30c9ee9a4da89dfffce4739e17bd9e6bf52d9aa5..fb5798581dbf665287831fe3b65dbcb82c6f95a6 100644
15+
--- a/src/gallium/targets/dri/target.c
16+
+++ b/src/gallium/targets/dri/target.c
17+
@@ -112,6 +112,7 @@ DEFINE_LOADER_DRM_ENTRYPOINT(meson)
18+
DEFINE_LOADER_DRM_ENTRYPOINT(mi0283qt)
19+
DEFINE_LOADER_DRM_ENTRYPOINT(mxsfb_drm)
20+
DEFINE_LOADER_DRM_ENTRYPOINT(pl111)
21+
+DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du)
22+
DEFINE_LOADER_DRM_ENTRYPOINT(repaper)
23+
DEFINE_LOADER_DRM_ENTRYPOINT(rockchip)
24+
DEFINE_LOADER_DRM_ENTRYPOINT(st7586)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
From 4febda271c6bb0dc69ebf573446c6922a1ec35fb Mon Sep 17 00:00:00 2001
2+
From: Khem Raj <raj.khem@gmail.com>
3+
Date: Thu, 2 Dec 2021 19:57:42 -0800
4+
Subject: [PATCH] util/format: Check for NEON before using it
5+
6+
This fixes build on rpi0-w and any other machine which does not have
7+
neon unit and is not used as FPU unit
8+
9+
Fixes errors e.g.
10+
11+
In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
12+
/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled"
13+
14+
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
15+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
16+
---
17+
src/util/format/u_format.c | 2 +-
18+
src/util/format/u_format_unpack_neon.c | 2 +-
19+
2 files changed, 2 insertions(+), 2 deletions(-)
20+
21+
diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
22+
index 36c5e52008e..f0a00971691 100644
23+
--- a/src/util/format/u_format.c
24+
+++ b/src/util/format/u_format.c
25+
@@ -1138,7 +1138,7 @@ static void
26+
util_format_unpack_table_init(void)
27+
{
28+
for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
29+
-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
30+
+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
31+
const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
32+
if (unpack) {
33+
util_format_unpack_table[format] = unpack;
34+
diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
35+
index a4a5cb1f723..1e4f794a295 100644
36+
--- a/src/util/format/u_format_unpack_neon.c
37+
+++ b/src/util/format/u_format_unpack_neon.c
38+
@@ -23,7 +23,7 @@
39+
40+
#include <u_format.h>
41+
42+
-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
43+
+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
44+
45+
/* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
46+
* unless you tell it "no really".
47+
--
48+
2.34.1
49+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
From e2e2fe86dd61b6fae682a1fec31bd0755ced5cd5 Mon Sep 17 00:00:00 2001
2+
From: Khem Raj <raj.khem@gmail.com>
3+
Date: Tue, 7 Dec 2021 11:13:27 -0800
4+
Subject: [PATCH] v3dv: account for 64bit time_t on 32bit arches
5+
6+
This makes is a bit more portable, especially on 32bit architectures
7+
with 64bit time_t defaults. Especially on musl its a must.
8+
9+
Fixes
10+
../mesa-21.3.0/src/broadcom/vulkan/v3dv_bo.c:71:15: error: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat]
11+
time.tv_sec);
12+
^~~~~~~~~~~
13+
14+
Also reported here [1]
15+
16+
[1] https://github.com/agherzan/meta-raspberrypi/issues/969
17+
18+
Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14118]
19+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
20+
---
21+
src/broadcom/vulkan/v3dv_bo.c | 4 ++--
22+
1 file changed, 2 insertions(+), 2 deletions(-)
23+
24+
diff --git a/src/broadcom/vulkan/v3dv_bo.c b/src/broadcom/vulkan/v3dv_bo.c
25+
index 71679ce..dc5e7f5 100644
26+
--- a/src/broadcom/vulkan/v3dv_bo.c
27+
+++ b/src/broadcom/vulkan/v3dv_bo.c
28+
@@ -67,8 +67,8 @@ bo_dump_stats(struct v3dv_device *device)
29+
30+
struct timespec time;
31+
clock_gettime(CLOCK_MONOTONIC, &time);
32+
- fprintf(stderr, " now: %ld\n",
33+
- time.tv_sec);
34+
+ fprintf(stderr, " now: %lld\n",
35+
+ (long long)time.tv_sec);
36+
}
37+
38+
if (cache->size_list_size) {
39+
--
40+
2.34.1
41+

meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 624f430dd0a91344146a2b8d49a69f23560c2fa2 Mon Sep 17 00:00:00 2001
1+
From 8f2f48b41aa17eec3c4d63685e3296f28e60b980 Mon Sep 17 00:00:00 2001
22
From: Alistair Francis <alistair@alistair23.me>
33
Date: Thu, 14 Nov 2019 13:08:31 -0800
44
Subject: [PATCH] meson.build: make TLS ELF optional
@@ -30,23 +30,23 @@ Signed-off-by: Alistair Francis <alistair@alistair23.me>
3030
2 files changed, 7 insertions(+), 1 deletion(-)
3131

3232
diff --git a/meson.build b/meson.build
33-
index efc6171..8450968 100644
33+
index 23618c1..c8cc5e3 100644
3434
--- a/meson.build
3535
+++ b/meson.build
36-
@@ -448,7 +448,7 @@ endif
37-
38-
# Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
36+
@@ -476,7 +476,7 @@ endif
3937
use_elf_tls = false
40-
-if not ['windows', 'freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
41-
+if not ['windows', 'freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls')
38+
if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and
39+
(not with_platform_android or get_option('platform-sdk-version') >= 29) and
40+
- (not with_platform_windows or not with_shared_glapi))
41+
+ (not with_platform_windows or not with_shared_glapi) and get_option('elf-tls'))
4242
pre_args += '-DUSE_ELF_TLS'
4343
use_elf_tls = true
44-
endif
44+
4545
diff --git a/meson_options.txt b/meson_options.txt
46-
index fc73f6e..d7482c0 100644
46+
index 29c402c..f70d9b2 100644
4747
--- a/meson_options.txt
4848
+++ b/meson_options.txt
49-
@@ -420,6 +420,12 @@ option(
49+
@@ -455,6 +455,12 @@ option(
5050
value : true,
5151
description : 'Enable direct rendering in GLX and EGL for DRI',
5252
)

meta/recipes-graphics/mesa/libglu_9.0.1.bb renamed to meta/recipes-graphics/mesa/libglu_9.0.2.bb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ LIC_FILES_CHKSUM = "file://include/GL/glu.h;endline=29;md5=6b79c570f644363b35645
1010

1111
# Epoch as this used to be part of mesa
1212
PE = "2"
13-
PR = "0"
1413

1514
SRC_URI = "https://mesa.freedesktop.org/archive/glu/glu-${PV}.tar.gz"
1615

17-
SRC_URI[md5sum] = "5599a0e0a97335e10239d9165aced60d"
18-
SRC_URI[sha256sum] = "f6f484cfcd51e489afe88031afdea1e173aa652697e4c19ddbcb8260579a10f7"
16+
SRC_URI[sha256sum] = "24effdfb952453cc00e275e1c82ca9787506aba0282145fff054498e60e19a65"
1917

2018
S = "${WORKDIR}/glu-${PV}"
2119

@@ -27,4 +25,4 @@ inherit autotools pkgconfig features_check
2725
REQUIRED_DISTRO_FEATURES = "x11 opengl"
2826

2927
# Remove the mesa-glu dependency in mesa-glu-dev, as mesa-glu is empty
30-
RDEPENDS_${PN}-dev = ""
28+
RDEPENDS:${PN}-dev = ""

meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ Subject: [PATCH] configure: Allow to disable demos which require GLEW or GLU
66
* in some systems without X11 support we don't have GLEW, but
77
mesa-demos are still useful
88

9-
Upstream-Status: Pending
9+
This isn't currently appropriate for upstream submission as glew has
10+
been replaced with glad there; glu situation would need to be re-assesed
11+
when upstream makes a new release, requested here:
12+
https://gitlab.freedesktop.org/mesa/demos/-/issues/22
13+
14+
Upstream-Status: Inappropriate [see above]
1015

1116
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
1217

meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch

Lines changed: 0 additions & 62 deletions
This file was deleted.

meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ SRC_URI = "https://mesa.freedesktop.org/archive/demos/${BPN}-${PV}.tar.bz2 \
1717
file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \
1818
file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
1919
file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \
20-
file://0013-only-build-GLX-demos-if-needed.patch \
2120
"
2221
SRC_URI[md5sum] = "6b65a02622765522176d00f553086fa3"
2322
SRC_URI[sha256sum] = "01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d"
@@ -27,7 +26,7 @@ inherit autotools pkgconfig features_check
2726
REQUIRED_DISTRO_FEATURES = "opengl x11"
2827

2928
PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
30-
x11 glew glu glx"
29+
x11 glew glu"
3130

3231
# The Wayland code doesn't work with Wayland 1.0, so disable it for now
3332
#${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}"
@@ -47,9 +46,8 @@ PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayla
4746
PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11"
4847
PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew"
4948
PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl"
50-
PACKAGECONFIG[glx] = "--enable-glx-demos,--disable-glx-demos"
5149

52-
do_install_append() {
50+
do_install:append() {
5351
# it can be completely empty when all PACKAGECONFIG options are disabled
5452
rmdir --ignore-fail-on-non-empty ${D}${bindir}
5553

meta/recipes-graphics/mesa/mesa-gl_21.0.3.bb renamed to meta/recipes-graphics/mesa/mesa-gl_21.3.7.bb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ S = "${WORKDIR}/mesa-${PV}"
99
# At least one DRI rendering engine is required to build mesa.
1010
# When no X11 is available, use osmesa for the rendering engine.
1111
PACKAGECONFIG ??= "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa gallium', d)}"
12-
PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa gallium', d)}"
12+
PACKAGECONFIG:class-target = "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa gallium', d)}"
1313

1414
# 21.0.0 version fails to build when any driver is enabled in DRIDRIVERS
1515
# ./mesa-21.0.0/meson.build:519:4: ERROR: Problem encountered: building dri drivers require at least one windowing system

0 commit comments

Comments
 (0)