summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa')
-rw-r--r--meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch18
-rw-r--r--meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch46
-rw-r--r--meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch16
-rw-r--r--meta/recipes-graphics/mesa/mesa-gl_20.2.1.bb (renamed from meta/recipes-graphics/mesa/mesa-gl_20.1.8.bb)0
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc23
-rw-r--r--meta/recipes-graphics/mesa/mesa_20.2.1.bb (renamed from meta/recipes-graphics/mesa/mesa_20.1.8.bb)0
6 files changed, 29 insertions, 74 deletions
diff --git a/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch b/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
index ee171ad1c8..74f7fe5c2d 100644
--- a/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
+++ b/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
@@ -1,4 +1,4 @@
1From 65857eaee12a21a631750ffcd9e64e0afbbc3af0 Mon Sep 17 00:00:00 2001 1From ce57ce220d9c377beabf4914f33c43118f672ffe Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair@alistair23.me> 2From: Alistair Francis <alistair@alistair23.me>
3Date: Thu, 14 Nov 2019 13:08:31 -0800 3Date: Thu, 14 Nov 2019 13:08:31 -0800
4Subject: [PATCH] meson.build: make TLS ELF optional 4Subject: [PATCH] meson.build: make TLS ELF optional
@@ -15,23 +15,23 @@ Signed-off-by: Alistair Francis <alistair@alistair23.me>
15 2 files changed, 7 insertions(+), 1 deletion(-) 15 2 files changed, 7 insertions(+), 1 deletion(-)
16 16
17diff --git a/meson.build b/meson.build 17diff --git a/meson.build b/meson.build
18index c51dde9..c16f78f 100644 18index c5136ea..185270d 100644
19--- a/meson.build 19--- a/meson.build
20+++ b/meson.build 20+++ b/meson.build
21@@ -392,7 +392,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat 21@@ -424,7 +424,7 @@ endif
22 endif
23 22
24 # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS. 23 # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
25-if not ['windows', 'freebsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) 24 use_elf_tls = false
26+if not ['windows', 'freebsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls') 25-if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
26+if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls')
27 pre_args += '-DUSE_ELF_TLS' 27 pre_args += '-DUSE_ELF_TLS'
28 use_elf_tls = true
28 endif 29 endif
29
30diff --git a/meson_options.txt b/meson_options.txt 30diff --git a/meson_options.txt b/meson_options.txt
31index ab43150..d7b1555 100644 31index 2d39d13..72006eb 100644
32--- a/meson_options.txt 32--- a/meson_options.txt
33+++ b/meson_options.txt 33+++ b/meson_options.txt
34@@ -355,6 +355,12 @@ option( 34@@ -368,6 +368,12 @@ option(
35 value : true, 35 value : true,
36 description : 'Enable direct rendering in GLX and EGL for DRI', 36 description : 'Enable direct rendering in GLX and EGL for DRI',
37 ) 37 )
diff --git a/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch b/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch
deleted file mode 100644
index a0536c87ac..0000000000
--- a/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 7eaa21a79ce6d6e92f6bf98c28b68e3fcb4d7874 Mon Sep 17 00:00:00 2001
2From: Fabio Berton <fabio.berton@ossystems.com.br>
3Date: Wed, 12 Jun 2019 14:18:31 -0300
4Subject: [PATCH] Allow enable DRI without DRI drivers
5
6Upstream-Status: Pending
7
8Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
9Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
10Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
11
12---
13 meson.build | 2 +-
14 meson_options.txt | 6 ++++++
15 2 files changed, 7 insertions(+), 1 deletion(-)
16
17diff --git a/meson.build b/meson.build
18index a954118..62864c6 100644
19--- a/meson.build
20+++ b/meson.build
21@@ -154,7 +154,7 @@ with_dri_r200 = dri_drivers.contains('r200')
22 with_dri_nouveau = dri_drivers.contains('nouveau')
23 with_dri_swrast = dri_drivers.contains('swrast')
24
25-with_dri = dri_drivers.length() != 0 and dri_drivers != ['']
26+with_dri = get_option('dri') or (dri_drivers.length() != 0 and dri_drivers != [''])
27
28 gallium_drivers = get_option('gallium-drivers')
29 if gallium_drivers.contains('auto')
30diff --git a/meson_options.txt b/meson_options.txt
31index 637ff14..700c34c 100644
32--- a/meson_options.txt
33+++ b/meson_options.txt
34@@ -35,6 +35,12 @@ option(
35 choices : ['auto', 'true', 'false'],
36 description : 'enable support for dri3'
37 )
38+option(
39+ 'dri',
40+ type : 'boolean',
41+ value : false,
42+ description : 'enable support for dri'
43+)
44 option(
45 'dri-drivers',
46 type : 'array',
diff --git a/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch b/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
index 8d614e571a..833742359f 100644
--- a/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
+++ b/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
@@ -1,4 +1,4 @@
1From 41cd8836d785c79381764e7de59319f87959a5cf Mon Sep 17 00:00:00 2001 1From 43d9e40db7357f27e91002b2bb7688b6775ebb43 Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair@alistair23.me> 2From: Alistair Francis <alistair@alistair23.me>
3Date: Thu, 14 Nov 2019 09:06:02 -0800 3Date: Thu, 14 Nov 2019 09:06:02 -0800
4Subject: [PATCH] Revert "mesa: Enable asm unconditionally, now that 4Subject: [PATCH] Revert "mesa: Enable asm unconditionally, now that
@@ -15,18 +15,18 @@ Signed-off-by: Alistair Francis <alistair@alistair23.me>
15 2 files changed, 67 insertions(+), 33 deletions(-) 15 2 files changed, 67 insertions(+), 33 deletions(-)
16 16
17diff --git a/meson.build b/meson.build 17diff --git a/meson.build b/meson.build
18index 62864c6..b53be8d 100644 18index e7dc599..e2fc934 100644
19--- a/meson.build 19--- a/meson.build
20+++ b/meson.build 20+++ b/meson.build
21@@ -49,6 +49,7 @@ with_vulkan_icd_dir = get_option('vulkan-icd-dir') 21@@ -52,6 +52,7 @@ pre_args = [
22 with_vulkan_icd_dir = get_option('vulkan-icd-dir')
22 with_tests = get_option('build-tests') 23 with_tests = get_option('build-tests')
23 with_valgrind = get_option('valgrind') 24 with_aco_tests = get_option('build-aco-tests')
24 with_libunwind = get_option('libunwind')
25+with_asm = get_option('asm') 25+with_asm = get_option('asm')
26 with_glx_read_only_text = get_option('glx-read-only-text') 26 with_glx_read_only_text = get_option('glx-read-only-text')
27 with_glx_direct = get_option('glx-direct') 27 with_glx_direct = get_option('glx-direct')
28 with_osmesa = get_option('osmesa') 28 with_osmesa = get_option('osmesa')
29@@ -1093,41 +1094,68 @@ dep_ws2_32 = cc.find_library('ws2_32', required : with_platform_windows) 29@@ -1154,41 +1155,68 @@ dep_ws2_32 = cc.find_library('ws2_32', required : with_platform_windows)
30 30
31 # TODO: shared/static? Is this even worth doing? 31 # TODO: shared/static? Is this even worth doing?
32 32
@@ -129,10 +129,10 @@ index 62864c6..b53be8d 100644
129 endif 129 endif
130 130
131diff --git a/meson_options.txt b/meson_options.txt 131diff --git a/meson_options.txt b/meson_options.txt
132index 700c34c..62e8472 100644 132index 147cccb..562b059 100644
133--- a/meson_options.txt 133--- a/meson_options.txt
134+++ b/meson_options.txt 134+++ b/meson_options.txt
135@@ -241,6 +241,12 @@ option( 135@@ -254,6 +254,12 @@ option(
136 value : false, 136 value : false,
137 description : 'Enable GLVND support.' 137 description : 'Enable GLVND support.'
138 ) 138 )
diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.1.8.bb b/meta/recipes-graphics/mesa/mesa-gl_20.2.1.bb
index e50782be1c..e50782be1c 100644
--- a/meta/recipes-graphics/mesa/mesa-gl_20.1.8.bb
+++ b/meta/recipes-graphics/mesa/mesa-gl_20.2.1.bb
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 9fc62e95e1..15f54c5acd 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -10,21 +10,20 @@ HOMEPAGE = "http://mesa3d.org"
10BUGTRACKER = "https://bugs.freedesktop.org" 10BUGTRACKER = "https://bugs.freedesktop.org"
11SECTION = "x11" 11SECTION = "x11"
12LICENSE = "MIT" 12LICENSE = "MIT"
13LIC_FILES_CHKSUM = "file://docs/license.html;md5=c1843d93c460bbf778d6037ce324f9f7" 13LIC_FILES_CHKSUM = "file://docs/license.rst;md5=9aa1bc48c9826ad9fdb16661f6930496"
14 14
15PE = "2" 15PE = "2"
16 16
17SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ 17SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
18 file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ 18 file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
19 file://0002-meson.build-make-TLS-ELF-optional.patch \ 19 file://0002-meson.build-make-TLS-ELF-optional.patch \
20 file://0003-Allow-enable-DRI-without-DRI-drivers.patch \
21 file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \ 20 file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \
22 file://0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch \ 21 file://0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch \
23 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ 22 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
24 file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \ 23 file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
25 " 24 "
26 25
27SRC_URI[sha256sum] = "df21351494f7caaec5a3ccc16f14f15512e98d2ecde178bba1d134edc899b961" 26SRC_URI[sha256sum] = "d1a46d9a3f291bc0e0374600bdcb59844fa3eafaa50398e472a36fc65fd0244a"
28 27
29UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" 28UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
30 29
@@ -88,6 +87,9 @@ EXTRA_OEMESON = " \
88 -Dplatforms='${@",".join("${PLATFORMS}".split())}' \ 87 -Dplatforms='${@",".join("${PLATFORMS}".split())}' \
89" 88"
90 89
90def strip_comma(s):
91 return s.strip(',')
92
91PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \ 93PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
92 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium virgl', '', d)} \ 94 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium virgl', '', d)} \
93 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \ 95 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
@@ -114,16 +116,16 @@ DRIDRIVERS_class-nativesdk = "swrast"
114DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915" 116DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915"
115DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915" 117DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915"
116# "dri" requires "opengl" 118# "dri" requires "opengl"
117PACKAGECONFIG[dri] = "-Ddri=true -Ddri-drivers=${DRIDRIVERS}, -Ddri=false -Ddri-drivers='', xorgproto libdrm" 119PACKAGECONFIG[dri] = "-Ddri-drivers=${@strip_comma('${DRIDRIVERS}')}, -Ddri-drivers='', xorgproto libdrm"
118PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence" 120PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence"
119 121
120# Vulkan drivers need dri3 enabled 122# Vulkan drivers need dri3 enabled
121# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9 123# amd could be enabled as well but requires gallium-llvm with llvm >= 3.9
122VULKAN_DRIVERS = "" 124VULKAN_DRIVERS = ""
123VULKAN_DRIVERS_append_x86_class-target = ",intel" 125VULKAN_DRIVERS_append_x86_class-target = ",intel"
124VULKAN_DRIVERS_append_x86-64_class-target = ",intel" 126VULKAN_DRIVERS_append_x86-64_class-target = ",intel"
125VULKAN_DRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" 127VULKAN_DRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
126PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers=''," 128PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',"
127 129
128PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" 130PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
129 131
@@ -150,9 +152,8 @@ GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '',
150GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}" 152GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}"
151 153
152# radeonsi requires LLVM 154# radeonsi requires LLVM
153GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}" 155GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
154GALLIUMDRIVERS_LLVM33_ENABLED = "${@oe.utils.version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}" 156GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${GALLIUMDRIVERS_RADEONSI}"
155GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
156 157
157PACKAGECONFIG[r600] = "" 158PACKAGECONFIG[r600] = ""
158PACKAGECONFIG[virgl] = "" 159PACKAGECONFIG[virgl] = ""
@@ -161,9 +162,9 @@ GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '
161GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}" 162GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}"
162GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}" 163GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}"
163 164
164PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''" 165PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers=''"
165PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \ 166PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \
166 ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}" 167 elfutils"
167PACKAGECONFIG[xa] = "-Dgallium-xa=true, -Dgallium-xa=false" 168PACKAGECONFIG[xa] = "-Dgallium-xa=true, -Dgallium-xa=false"
168PACKAGECONFIG[va] = "-Dgallium-va=true,-Dgallium-va=false,libva-initial" 169PACKAGECONFIG[va] = "-Dgallium-va=true,-Dgallium-va=false,libva-initial"
169 170
diff --git a/meta/recipes-graphics/mesa/mesa_20.1.8.bb b/meta/recipes-graphics/mesa/mesa_20.2.1.bb
index 96e8aa38d6..96e8aa38d6 100644
--- a/meta/recipes-graphics/mesa/mesa_20.1.8.bb
+++ b/meta/recipes-graphics/mesa/mesa_20.2.1.bb