gallivm: Return true from arch_rounding_available() if NEON is available
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_arit.c
index c050bfdb936dbd5b6495f6ae717e6fdaf900b788..057c50ed278ce50b45dbe570373a643a942a0fb1 100644 (file)
@@ -1992,6 +1992,8 @@ arch_rounding_available(const struct lp_type type)
    else if ((util_cpu_caps.has_altivec &&
             (type.width == 32 && type.length == 4)))
       return TRUE;
+   else if (util_cpu_caps.has_neon)
+      return TRUE;
 
    return FALSE;
 }
@@ -2099,7 +2101,7 @@ lp_build_round_arch(struct lp_build_context *bld,
                     LLVMValueRef a,
                     enum lp_build_round_mode mode)
 {
-   if (util_cpu_caps.has_sse4_1) {
+   if (util_cpu_caps.has_sse4_1 || util_cpu_caps.has_neon) {
       LLVMBuilderRef builder = bld->gallivm->builder;
       const struct lp_type type = bld->type;
       const char *intrinsic_root;