On 05/09/2018 10:54, Sergii Romantsov wrote:
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
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107779
Signed-off-by: Sergii Romantsov <[email protected]>
CC: <[email protected]>
---
src/intel/meson.build | 2 ++
src/mesa/drivers/dri/i965/Makefile.am | 2 +-
src/mesa/drivers/dri/i965/meson.build | 6 +++---
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/intel/meson.build b/src/intel/meson.build
index b3dcbdc..7a0d6d7 100644
--- a/src/intel/meson.build
+++ b/src/intel/meson.build
@@ -32,3 +32,5 @@ endif
if with_intel_vk
subdir('vulkan')
endif
+
+c_sse2_args = ['-msse2', '-mstackrealign']
I would put this on top of the file. Otherwise the evaluation order
might make this a no-op.
\ No newline at end of file
diff --git a/src/mesa/drivers/dri/i965/Makefile.am
b/src/mesa/drivers/dri/i965/Makefile.am
index 889d4c6..0afa7a2 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 6c94f4a..b95e2d7 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,
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev