mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
meson: Simplify the power8 optimization logic
If it compiles, it works. And there's not a particularly good reason to disable it, so don't let people disable it. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Dylan Baker <dylan.c.baker@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34239>
This commit is contained in:
parent
3122df666e
commit
c4b305079d
2 changed files with 14 additions and 22 deletions
33
meson.build
33
meson.build
|
|
@ -721,27 +721,18 @@ if with_gallium_st_d3d10umd
|
||||||
error('The d3d10umd state tracker requires gallium softpipe/llvmpipe.')
|
error('The d3d10umd state tracker requires gallium softpipe/llvmpipe.')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
_power8 = get_option('power8')
|
|
||||||
if _power8.allowed()
|
if host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'
|
||||||
if host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'
|
if cc.compiles('''
|
||||||
if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.8')
|
#include <altivec.h>
|
||||||
error('Altivec is not supported with gcc version < 4.8.')
|
int main() {
|
||||||
endif
|
vector unsigned char r;
|
||||||
if cc.compiles('''
|
vector unsigned int v = vec_splat_u32 (1);
|
||||||
#include <altivec.h>
|
r = __builtin_vec_vgbbd ((vector unsigned char) v);
|
||||||
int main() {
|
return 0;
|
||||||
vector unsigned char r;
|
}''',
|
||||||
vector unsigned int v = vec_splat_u32 (1);
|
name : 'POWER8 intrinsics')
|
||||||
r = __builtin_vec_vgbbd ((vector unsigned char) v);
|
pre_args += ['-D_ARCH_PWR8']
|
||||||
return 0;
|
|
||||||
}''',
|
|
||||||
args : '-mpower8-vector',
|
|
||||||
name : 'POWER8 intrinsics')
|
|
||||||
pre_args += ['-D_ARCH_PWR8']
|
|
||||||
c_cpp_args += '-mpower8-vector'
|
|
||||||
elif _power8.enabled()
|
|
||||||
error('POWER8 intrinsic support required but not found.')
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -547,7 +547,8 @@ option(
|
||||||
'power8',
|
'power8',
|
||||||
type : 'feature',
|
type : 'feature',
|
||||||
deprecated: {'true': 'enabled', 'false': 'disabled'},
|
deprecated: {'true': 'enabled', 'false': 'disabled'},
|
||||||
description : 'Enable power8 optimizations.',
|
description : 'Does nothing, left here for a while to avoid build breakages.',
|
||||||
|
deprecated: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
option(
|
option(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue