#include "pipe/p_config.h"
#include "pipe/p_compiler.h"
+#include "util/macros.h"
#include "util/u_cpu_detect.h"
#include "util/u_debug.h"
#include "util/u_memory.h"
lp_set_target_options();
+ // Default to 256 until we're confident llvmpipe with 512 is as correct and not slower than 256
+ lp_native_vector_width = MIN2(util_get_cpu_caps()->max_vector_bits, 256);
+
lp_native_vector_width = debug_get_num_option("LP_NATIVE_VECTOR_WIDTH",
- util_get_cpu_caps()->max_vector_bits);
+ lp_native_vector_width);
#ifdef PIPE_ARCH_PPC_64
/* Set the NJ bit in VSCR to 0 so denormalized values are handled as
*/
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