diff options
author | Yonggang Luo <luoyonggang@gmail.com> | 2022-08-30 14:57:26 +0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-09-02 01:51:42 +0000 |
commit | 0244b1858fbb25f9230c11ac0aba671bc859d467 (patch) | |
tree | 95d6a189b6581a96885f4edacb71eced46f2aab5 /src/util | |
parent | d240fb150fcaff3fb62a0b8c2746bbe9f8301ae9 (diff) |
util: add support for detecting avx512 vector bit size
Default to 256 until we're confident llvmpipe with 512 is
as correct and not slower than 256
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17813>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/u_cpu_detect.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/u_cpu_detect.c b/src/util/u_cpu_detect.c index c15ea11f783..dd799f29056 100644 --- a/src/util/u_cpu_detect.c +++ b/src/util/u_cpu_detect.c @@ -671,7 +671,9 @@ void check_max_vector_bits(void) */ util_cpu_caps.max_vector_bits = 128; #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) - if (util_cpu_caps.has_avx) { + if (util_cpu_caps.has_avx512f) { + util_cpu_caps.max_vector_bits = 512; + } else if (util_cpu_caps.has_avx) { util_cpu_caps.max_vector_bits = 256; } #endif |