aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch46
-rw-r--r--recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch221
-rw-r--r--recipes-graphics/mesa/mesa_git.bb2
3 files changed, 0 insertions, 269 deletions
diff --git a/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch b/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch
deleted file mode 100644
index 91f819b..0000000
--- a/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 96fc2efc4d120fc2bdbc39cc0c656a939790b51e 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
-
-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 23a3cd66156..f19e59c32fe 100644
---- a/meson.build
-+++ b/meson.build
-@@ -189,7 +189,7 @@ with_dri_r100 = dri_drivers.contains('r100')
- with_dri_r200 = dri_drivers.contains('r200')
- with_dri_nouveau = dri_drivers.contains('nouveau')
-
--with_dri = dri_drivers.length() != 0
-+with_dri = get_option('dri') or (dri_drivers.length() != 0 and dri_drivers != [''])
-
- gallium_drivers = get_option('gallium-drivers')
- if gallium_drivers.contains('auto')
-diff --git a/meson_options.txt b/meson_options.txt
-index 118eba3914d..f7354104c4a 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -41,6 +41,12 @@ option(
- choices : ['auto', 'true', 'false', 'disabled', 'enabled'],
- description : 'enable support for dri3'
- )
-+option(
-+ 'dri',
-+ type : 'boolean',
-+ value : false,
-+ description : 'enable support for dri'
-+)
- option(
- 'dri-drivers',
- type : 'array',
diff --git a/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch b/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
deleted file mode 100644
index 2ad76a5..0000000
--- a/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
+++ /dev/null
@@ -1,221 +0,0 @@
-From 793a0a974e56b072699f8613978acc7d08b8857a Mon Sep 17 00:00:00 2001
-From: Alistair Francis <alistair@alistair23.me>
-Date: Wed, 2 Sep 2020 15:31:59 -0500
-Subject: [PATCH] Revert "mesa: Enable asm unconditionally, now that
-
- gen_matypes is gone."
-
-This reverts commit 20294dceebc23236e33b22578245f7e6f41b6997.
-
-Upstream-Status: Inappropriate [configuration]
-Signed-off-by: Alistair Francis <alistair@alistair23.me>
-
----
- Android.common.mk | 3 +
- Android.mk | 7 +++
- meson.build | 96 +++++++++++++++++++----------
- meson_options.txt | 6 ++
- src/mesa/Android.libmesa_dricore.mk | 2 +
- src/mesa/Android.libmesa_st_mesa.mk | 2 +
- 6 files changed, 83 insertions(+), 33 deletions(-)
-
-diff --git a/Android.common.mk b/Android.common.mk
-index 7ef6a90a179..061de3bb147 100644
---- a/Android.common.mk
-+++ b/Android.common.mk
-@@ -104,9 +104,12 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo true),true)
- LOCAL_CFLAGS += -DHAVE_SYS_SHM_H
- endif
-
-+ifeq ($(strip $(MESA_ENABLE_ASM)),true)
- ifeq ($(TARGET_ARCH),x86)
- LOCAL_CFLAGS += \
- -DUSE_X86_ASM
-+
-+endif
- endif
- ifeq ($(ARCH_ARM_HAVE_NEON),true)
- LOCAL_CFLAGS_arm += -DUSE_ARM_ASM
-diff --git a/Android.mk b/Android.mk
-index 3b5d029f804..6ec64abc87c 100644
---- a/Android.mk
-+++ b/Android.mk
-@@ -96,6 +96,13 @@ endif
-
- $(foreach d, $(MESA_BUILD_CLASSIC) $(MESA_BUILD_GALLIUM), $(eval $(d) := true))
-
-+# host and target must be the same arch to generate matypes.h
-+ifeq ($(TARGET_ARCH),$(HOST_ARCH))
-+MESA_ENABLE_ASM := true
-+else
-+MESA_ENABLE_ASM := false
-+endif
-+
- ifneq ($(filter true, $(HAVE_GALLIUM_RADEONSI)),)
- MESA_ENABLE_LLVM := true
- endif
-diff --git a/meson.build b/meson.build
-index f19e59c32fe..69a01218792 100644
---- a/meson.build
-+++ b/meson.build
-@@ -55,6 +55,9 @@ with_moltenvk_dir = get_option('moltenvk-dir')
- with_vulkan_icd_dir = get_option('vulkan-icd-dir')
- with_tests = get_option('build-tests')
- with_aco_tests = get_option('build-aco-tests')
-+with_valgrind = get_option('valgrind')
-+with_libunwind = get_option('libunwind')
-+with_asm = get_option('asm')
- with_glx_read_only_text = get_option('glx-read-only-text')
- with_glx_direct = get_option('glx-direct')
- with_osmesa = get_option('osmesa')
-@@ -1236,41 +1239,68 @@ dep_ws2_32 = cc.find_library('ws2_32', required : with_platform_windows)
-
- # TODO: shared/static? Is this even worth doing?
-
-+# When cross compiling we generally need to turn off the use of assembly,
-+# because mesa's assembly relies on building an executable for the host system,
-+# and running it to get information about struct sizes. There is at least one
-+# case of cross compiling where we can use asm, and that's x86_64 -> x86 when
-+# host OS == build OS, since in that case the build machine can run the host's
-+# binaries.
-+if with_asm and meson.is_cross_build()
-+ if build_machine.system() != host_machine.system()
-+ # TODO: It may be possible to do this with an exe_wrapper (like wine).
-+ message('Cross compiling from one OS to another, disabling assembly.')
-+ with_asm = false
-+ elif not (build_machine.cpu_family().startswith('x86') and host_machine.cpu_family() == 'x86')
-+ # FIXME: Gentoo always sets -m32 for x86_64 -> x86 builds, resulting in an
-+ # x86 -> x86 cross compile. We use startswith rather than == to handle this
-+ # case.
-+ # TODO: There may be other cases where the 64 bit version of the
-+ # architecture can run 32 bit binaries (aarch64 and armv7 for example)
-+ message('''
-+ Cross compiling to different architectures, and the host cannot run
-+ the build machine's binaries. Disabling assembly.
-+ ''')
-+ with_asm = false
-+ endif
-+endif
-+
- with_asm_arch = ''
--if host_machine.cpu_family() == 'x86'
-- if system_has_kms_drm or host_machine.system() == 'gnu'
-- with_asm_arch = 'x86'
-- pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
-- '-DUSE_SSE_ASM']
--
-- if with_glx_read_only_text
-- pre_args += ['-DGLX_X86_READONLY_TEXT']
-+if with_asm
-+ if host_machine.cpu_family() == 'x86'
-+ if system_has_kms_drm or host_machine.system() == 'gnu'
-+ with_asm_arch = 'x86'
-+ pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
-+ '-DUSE_SSE_ASM']
-+
-+ if with_glx_read_only_text
-+ pre_args += ['-DGLX_X86_READONLY_TEXT']
-+ endif
-+ endif
-+ elif host_machine.cpu_family() == 'x86_64'
-+ if system_has_kms_drm
-+ with_asm_arch = 'x86_64'
-+ pre_args += ['-DUSE_X86_64_ASM']
-+ endif
-+ elif host_machine.cpu_family() == 'arm'
-+ if system_has_kms_drm
-+ with_asm_arch = 'arm'
-+ pre_args += ['-DUSE_ARM_ASM']
-+ endif
-+ elif host_machine.cpu_family() == 'aarch64'
-+ if system_has_kms_drm
-+ with_asm_arch = 'aarch64'
-+ pre_args += ['-DUSE_AARCH64_ASM']
-+ endif
-+ elif host_machine.cpu_family() == 'sparc64'
-+ if system_has_kms_drm
-+ with_asm_arch = 'sparc'
-+ pre_args += ['-DUSE_SPARC_ASM']
-+ endif
-+ elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little'
-+ if system_has_kms_drm
-+ with_asm_arch = 'ppc64le'
-+ pre_args += ['-DUSE_PPC64LE_ASM']
- endif
-- endif
--elif host_machine.cpu_family() == 'x86_64'
-- if system_has_kms_drm
-- with_asm_arch = 'x86_64'
-- pre_args += ['-DUSE_X86_64_ASM']
-- endif
--elif host_machine.cpu_family() == 'arm'
-- if system_has_kms_drm
-- with_asm_arch = 'arm'
-- pre_args += ['-DUSE_ARM_ASM']
-- endif
--elif host_machine.cpu_family() == 'aarch64'
-- if system_has_kms_drm
-- with_asm_arch = 'aarch64'
-- pre_args += ['-DUSE_AARCH64_ASM']
-- endif
--elif host_machine.cpu_family() == 'sparc64'
-- if system_has_kms_drm
-- with_asm_arch = 'sparc'
-- pre_args += ['-DUSE_SPARC_ASM']
-- endif
--elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little'
-- if system_has_kms_drm
-- with_asm_arch = 'ppc64le'
-- pre_args += ['-DUSE_PPC64LE_ASM']
- endif
- endif
-
-diff --git a/meson_options.txt b/meson_options.txt
-index f7354104c4a..648059478fc 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -263,6 +263,12 @@ option(
- choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
- description : 'Build support for OpenGL ES 2.x and 3.x'
- )
-+option(
-+ 'asm',
-+ type : 'boolean',
-+ value : true,
-+ description : 'Build assembly code if possible'
-+)
- option(
- 'opengl',
- type : 'boolean',
-diff --git a/src/mesa/Android.libmesa_dricore.mk b/src/mesa/Android.libmesa_dricore.mk
-index 8eb6aabe836..792117767b4 100644
---- a/src/mesa/Android.libmesa_dricore.mk
-+++ b/src/mesa/Android.libmesa_dricore.mk
-@@ -39,9 +39,11 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES
- LOCAL_SRC_FILES := \
- $(MESA_FILES)
-
-+ifeq ($(strip $(MESA_ENABLE_ASM)),true)
- ifeq ($(TARGET_ARCH),x86)
- LOCAL_SRC_FILES += $(X86_FILES)
- endif # x86
-+endif # MESA_ENABLE_ASM
-
- ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
- LOCAL_WHOLE_STATIC_LIBRARIES := \
-diff --git a/src/mesa/Android.libmesa_st_mesa.mk b/src/mesa/Android.libmesa_st_mesa.mk
-index 16153a3c5bd..ddfd03059c5 100644
---- a/src/mesa/Android.libmesa_st_mesa.mk
-+++ b/src/mesa/Android.libmesa_st_mesa.mk
-@@ -42,9 +42,11 @@ LOCAL_GENERATED_SOURCES := \
- $(MESA_GEN_GLSL_H) \
- $(MESA_GEN_NIR_H)
-
-+ifeq ($(strip $(MESA_ENABLE_ASM)),true)
- ifeq ($(TARGET_ARCH),x86)
- LOCAL_SRC_FILES += $(X86_FILES)
- endif # x86
-+endif # MESA_ENABLE_ASM
-
- ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
- LOCAL_WHOLE_STATIC_LIBRARIES := \
diff --git a/recipes-graphics/mesa/mesa_git.bb b/recipes-graphics/mesa/mesa_git.bb
index ed58e55..55992a4 100644
--- a/recipes-graphics/mesa/mesa_git.bb
+++ b/recipes-graphics/mesa/mesa_git.bb
@@ -3,8 +3,6 @@ require recipes-graphics/mesa/mesa.inc
SRC_URI = "git://gitlab.freedesktop.org/mesa/mesa.git;protocol=https;branch=main \
file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
file://0002-meson.build-make-TLS-ELF-optional.patch \
- file://0003-Allow-enable-DRI-without-DRI-drivers.patch \
- file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
"
LIC_FILES_CHKSUM = "file://docs/license.rst;md5=17a4ea65de7a9ab42437f3131e616a7f"