summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorSergii Romantsov <[email protected]>2018-09-06 11:07:45 +0300
committerLionel Landwerlin <[email protected]>2018-09-07 13:45:46 +0100
commitd709f127927cb0ad40d5bf4eaec33c3c27f7738a (patch)
treecf322d59e14b46e9fbae1add8a68d02c5de3b029 /src/mesa
parent5404e0637f17fa7ae33db33760e10bf4f73b3095 (diff)
intel: compiler option msse2 and mstackrealign
Seems in case of 32-bit library, usage of msse2 makes some stack corruption or incorrect instructions. Usage with mstackrealign fixes that case. v2: Fixed meson. v3: Definition of c_sse2_args moved on the top (L.Landwerlin). Added mstackrealign for Android's mks where msee4.1 is used. v4: Added for Vulkan also. v5: Commit message correction. CC: <[email protected]> Fixes: 6b05c080f202 (i965: Compile with -msse3) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107779 Signed-off-by: Sergii Romantsov <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/Android.libmesa_dricore.mk2
-rw-r--r--src/mesa/Android.libmesa_sse41.mk2
-rw-r--r--src/mesa/drivers/dri/i965/Makefile.am2
-rw-r--r--src/mesa/drivers/dri/i965/meson.build6
4 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/Android.libmesa_dricore.mk b/src/mesa/Android.libmesa_dricore.mk
index 34fd8581c2d..792117767b4 100644
--- a/src/mesa/Android.libmesa_dricore.mk
+++ b/src/mesa/Android.libmesa_dricore.mk
@@ -49,7 +49,7 @@ ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
LOCAL_WHOLE_STATIC_LIBRARIES := \
libmesa_sse41
LOCAL_CFLAGS := \
- -msse4.1 \
+ -msse4.1 -mstackrealign \
-DUSE_SSE41
endif
diff --git a/src/mesa/Android.libmesa_sse41.mk b/src/mesa/Android.libmesa_sse41.mk
index da40f43df69..de19a1fb48b 100644
--- a/src/mesa/Android.libmesa_sse41.mk
+++ b/src/mesa/Android.libmesa_sse41.mk
@@ -34,7 +34,7 @@ LOCAL_SRC_FILES += \
$(X86_SSE41_FILES)
LOCAL_CFLAGS := \
- -msse4.1
+ -msse4.1 -mstackrealign
LOCAL_C_INCLUDES := \
$(MESA_TOP)/src/mapi \
diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am
index 889d4c68a2b..0afa7a2f216 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -44,7 +44,7 @@ AM_CFLAGS = \
$(WNO_OVERRIDE_INIT) \
$(LIBDRM_CFLAGS) \
$(VALGRIND_CFLAGS) \
- -msse2
+ -msse2 -mstackrealign
AM_CXXFLAGS = $(AM_CFLAGS)
diff --git a/src/mesa/drivers/dri/i965/meson.build b/src/mesa/drivers/dri/i965/meson.build
index 6c94f4aea71..b95e2d76489 100644
--- a/src/mesa/drivers/dri/i965/meson.build
+++ b/src/mesa/drivers/dri/i965/meson.build
@@ -142,7 +142,7 @@ foreach v : ['40', '45', '50', '60', '70', '75', '80', '90', '100', '110']
['genX_blorp_exec.c', 'genX_state_upload.c', gen_xml_pack],
include_directories : [inc_common, inc_intel, inc_dri_common],
c_args : [
- c_vis_args, no_override_init_args, '-msse2',
+ c_vis_args, no_override_init_args, c_sse2_args,
'-DGEN_VERSIONx10=@0@'.format(v),
],
dependencies : [dep_libdrm, idep_nir_headers],
@@ -183,8 +183,8 @@ libi965 = static_library(
include_directories : [
inc_common, inc_intel, inc_dri_common, inc_util, inc_drm_uapi,
],
- c_args : [c_vis_args, no_override_init_args, '-msse2'],
- cpp_args : [cpp_vis_args, '-msse2'],
+ c_args : [c_vis_args, no_override_init_args, c_sse2_args],
+ cpp_args : [cpp_vis_args, c_sse2_args],
link_with : [
i965_gen_libs, libintel_common, libintel_dev, libisl, libintel_compiler,
libblorp,