aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch')
-rw-r--r--recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch99
1 files changed, 87 insertions, 12 deletions
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
index 6bdbd4e..1cda3df 100644
--- 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
@@ -1,6 +1,6 @@
-From 41cd8836d785c79381764e7de59319f87959a5cf Mon Sep 17 00:00:00 2001
+From cfd31ff9b1bfa69c6a1b3486386a7eb28d9e925a Mon Sep 17 00:00:00 2001
From: Alistair Francis <alistair@alistair23.me>
-Date: Thu, 14 Nov 2019 09:06:02 -0800
+Date: Wed, 2 Sep 2020 15:31:59 -0500
Subject: [PATCH] Revert "mesa: Enable asm unconditionally, now that
gen_matypes is gone."
@@ -8,25 +8,65 @@ This reverts commit 20294dceebc23236e33b22578245f7e6f41b6997.
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Alistair Francis <alistair@alistair23.me>
-
---
- meson.build | 94 ++++++++++++++++++++++++++++++-----------------
- meson_options.txt | 6 +++
- 2 files changed, 67 insertions(+), 33 deletions(-)
+ 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 9141ef951d6..cec6f7888c3 100644
+--- a/Android.common.mk
++++ b/Android.common.mk
+@@ -103,9 +103,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 aa2e7f7610e..adc0db69584 100644
+--- a/Android.mk
++++ b/Android.mk
+@@ -90,6 +90,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 62864c6..b53be8d 100644
+index 2bc7d3a3556..c0159c155fb 100644
--- a/meson.build
+++ b/meson.build
-@@ -49,6 +49,7 @@ with_vulkan_icd_dir = get_option('vulkan-icd-dir')
-
+@@ -52,6 +52,9 @@ pre_args = [
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')
-@@ -1093,41 +1094,68 @@ dep_ws2_32 = cc.find_library('ws2_32', required : with_platform_windows)
+@@ -1149,41 +1152,68 @@ dep_ws2_32 = cc.find_library('ws2_32', required : with_platform_windows)
# TODO: shared/static? Is this even worth doing?
@@ -129,10 +169,10 @@ index 62864c6..b53be8d 100644
endif
diff --git a/meson_options.txt b/meson_options.txt
-index 700c34c..62e8472 100644
+index 0d8fd65e07e..0fc28d69c93 100644
--- a/meson_options.txt
+++ b/meson_options.txt
-@@ -241,6 +241,12 @@ option(
+@@ -254,6 +254,12 @@ option(
value : false,
description : 'Enable GLVND support.'
)
@@ -145,3 +185,38 @@ index 700c34c..62e8472 100644
option(
'glx-read-only-text',
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 := \
+--
+2.28.0
+