summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files')
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch42
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch52
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch46
3 files changed, 140 insertions, 0 deletions
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
new file mode 100644
index 000000000..9fba5da4b
--- /dev/null
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
@@ -0,0 +1,42 @@
+From ea966884e39aae9571c038fab55f3c1663d17850 Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Wed, 12 Jun 2019 13:40:20 -0300
+Subject: [PATCH] meson.build: check for all linux host_os combinations
+Organization: O.S. Systems Software LTDA.
+
+Make sure that we are also looking for our host_os combinations like
+linux-musl etc. when assuming support for DRM/KMS.
+
+Also delete a duplicate line.
+
+Upstream-Status: Pending
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ meson.build | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 567a81afd6f..b33b430aed4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -107,7 +107,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 = get_option('shared-glapi') and with_any_opengl
+
+-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux'].contains(host_machine.system())
++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux')
+
+ dri_drivers = get_option('dri-drivers')
+ if dri_drivers.contains('auto')
+@@ -845,7 +845,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));',
+ endif
+
+ # TODO: this is very incomplete
+-if ['linux', 'cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system())
++if ['cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) or host_machine.system().startswith('linux')
+ pre_args += '-D_GNU_SOURCE'
+ endif
+
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch
new file mode 100644
index 000000000..641bacf1d
--- /dev/null
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch
@@ -0,0 +1,52 @@
+From cee8e48c5344124e5d84307cb0c48ee0c9b3e684 Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Wed, 12 Jun 2019 14:15:57 -0300
+Subject: [PATCH] meson.build: make TLS GLX optional again
+Organization: O.S. Systems Software LTDA.
+
+This was optional with autotools, and needs to be disabled
+when using musl C library, for instance.
+
+Upstream-Status: Pending
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ meson.build | 4 +++-
+ meson_options.txt | 7 +++++++
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index b33b430aed4..0e50bb26c0a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -369,7 +369,9 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat
+ endif
+ endif
+
+-pre_args += '-DGLX_USE_TLS'
++if get_option('glx-tls')
++ pre_args += '-DGLX_USE_TLS'
++endif
+ if with_glx != 'disabled'
+ if not (with_platform_x11 and with_any_opengl)
+ error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
+diff --git a/meson_options.txt b/meson_options.txt
+index 1f72faabee8..fcd49efea27 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -339,6 +339,13 @@ option(
+ value : true,
+ description : 'Enable direct rendering in GLX and EGL for DRI',
+ )
++option(
++ 'glx-tls',
++ type : 'boolean',
++ value : true,
++ description : 'Enable TLS support in GLX',
++)
++
+ option(
+ 'I-love-half-baked-turnips',
+ type : 'boolean',
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch
new file mode 100644
index 000000000..3458c1919
--- /dev/null
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch
@@ -0,0 +1,46 @@
+From f1482e88c2295b9c7288f5b273335a8e18039de8 Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Wed, 12 Jun 2019 14:18:31 -0300
+Subject: [PATCH] Allow enable DRI without DRI drivers
+Organization: O.S. Systems Software LTDA.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ meson.build | 2 +-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 0e50bb26c0a..de065c290d6 100644
+--- a/meson.build
++++ b/meson.build
+@@ -137,7 +137,7 @@ with_dri_r200 = dri_drivers.contains('r200')
+ with_dri_nouveau = dri_drivers.contains('nouveau')
+ with_dri_swrast = dri_drivers.contains('swrast')
+
+-with_dri = dri_drivers.length() != 0 and dri_drivers != ['']
++with_dri = get_option('dri') or (_drivers.length() != 0 and _drivers != [''])
+
+ gallium_drivers = get_option('gallium-drivers')
+ if gallium_drivers.contains('auto')
+diff --git a/meson_options.txt b/meson_options.txt
+index fcd49efea27..0529200b3bb 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -34,6 +34,12 @@ option(
+ choices : ['auto', 'true', 'false'],
+ description : 'enable support for dri3'
+ )
++option(
++ 'dri',
++ type : 'boolean',
++ value : false,
++ description : 'enable support for dri'
++)
+ option(
+ 'dri-drivers',
+ type : 'array',