summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2019-01-14 15:15:09 -0800
committerDylan Baker <[email protected]>2019-01-24 19:14:50 +0000
commit7cb7f35bc76bf21d15ca4b1f4ee724e9ff1e2804 (patch)
tree92ab0c4a5bdb5ae271b30489dc6f8fc93603dfdd /src/gallium/drivers
parent3ba7ab8d2c8454346c3349ddc56cb480eea4f958 (diff)
meson: Fix compiler checks for SWR with ICC
This is a bit fragile, as the way this "fixes" the check is to move the one that we know is correct before the one that is incorrectly reported as working. In meson 0.49.1 (which isn't out yet) this is fixed that the incorrect check is reported as a failure. Fixes: e0b037d6979b266d4959c1e31746d4d19c941fdb ("meson: Build SWR driver") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109129 Acked-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/swr/meson.build30
1 files changed, 5 insertions, 25 deletions
diff --git a/src/gallium/drivers/swr/meson.build b/src/gallium/drivers/swr/meson.build
index 6c1cdbd0307..3f32d031e14 100644
--- a/src/gallium/drivers/swr/meson.build
+++ b/src/gallium/drivers/swr/meson.build
@@ -190,11 +190,7 @@ swr_arch_libs = []
swr_arch_defines = []
swr_avx_args = cpp.first_supported_argument(
- '-target-cpu=sandybridge', '-mavx', '-march=core-avx', '-tp=sandybridge',
- prefix : '''
- #if !defined(__AVX__)
- # error
- #endif ''',
+ '-mavx', '-target-cpu=sandybridge', '-march=core-avx', '-tp=sandybridge',
)
if swr_avx_args == []
error('Cannot find AVX support for swr. (these are required for SWR an all architectures.)')
@@ -215,18 +211,10 @@ endif
if with_swr_arches.contains('avx2')
swr_avx2_args = cpp.first_supported_argument(
- '-target-cpu=haswell', '-march=core-avx2', '-tp=haswell',
- prefix : '''
- #if !defined(__AVX2__)
- # error
- #endif ''',
+ '-march=core-avx2', '-target-cpu=haswell', '-tp=haswell',
)
if swr_avx2_args == []
- if cpp.has_argument(['-mavx2', '-mfma', '-mbmi2', '-mf16c'],
- prefix : '''
- #if !defined(__AVX2__)
- # error
- #endif ''')
+ if cpp.has_argument(['-mavx2', '-mfma', '-mbmi2', '-mf16c'])
swr_avx2_args = ['-mavx2', '-mfma', '-mbmi2', '-mf16c']
else
error('Cannot find AVX2 support for swr.')
@@ -248,11 +236,7 @@ endif
if with_swr_arches.contains('knl')
swr_knl_args = cpp.first_supported_argument(
- '-target-cpu=mic-knl', '-march=knl', '-xMIC-AVX512',
- prefix : '''
- #if !defined(__AVX512F__) || !defined(__AVX512ER__)
- # error
- #endif ''',
+ '-march=knl', '-target-cpu=mic-knl', '-xMIC-AVX512',
)
if swr_knl_args == []
error('Cannot find KNL support for swr.')
@@ -276,11 +260,7 @@ endif
if with_swr_arches.contains('skx')
swr_skx_args = cpp.first_supported_argument(
- '-target-cpu=x86-skylake', '-march=skylake-avx512', '-xCORE-AVX512',
- prefix : '''
- #if !defined(__AVX512F__) || !defined(__AVX512BW__)
- # error
- #endif ''',
+ '-march=skylake-avx512', '-target-cpu=x86-skylake', '-xCORE-AVX512',
)
if swr_skx_args == []
error('Cannot find SKX support for swr.')