diff --git a/src/gallium/auxiliary/gallivm/lp_bld_conv.c b/src/gallium/auxiliary/gallivm/lp_bld_conv.c index cee1bb19626..de2d9fbcbdf 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_conv.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_conv.c @@ -76,6 +76,7 @@ #include "lp_bld_intr.h" #include "lp_bld_printf.h" #include "lp_bld_format.h" +#include "lp_bld_limits.h" /* the lp_test_format test fails on mingw/i686 at -O2 with gcc 10.x @@ -111,9 +112,8 @@ lp_build_half_to_float(struct gallivm_state *gallivm, LLVMTypeRef ext_int_vec_type = lp_build_vec_type(gallivm, i32_type); LLVMValueRef h; - if (util_get_cpu_caps()->has_f16c && - (src_length == 4 || src_length == 8)) { - if (LLVM_VERSION_MAJOR < 11) { + if (lp_has_fp16() && (src_length == 4 || src_length == 8)) { + if (util_get_cpu_caps()->has_f16c && LLVM_VERSION_MAJOR < 11) { const char *intrinsic = NULL; if (src_length == 4) { src = lp_build_pad_vector(gallivm, src, 8);