Fixes 7 Khronos GL CTS tests:
KHR-GL45.gpu_shader_fp64.builtin.smoothstep_dvec{double, 2, 3, 4}
KHR-GL45.gpu_shader_fp64.builtin.smoothstep_against_scalar_dvec{2, 3, 4}
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
return !__flt64_nonnan(a, b);
}
+uint64_t
+__fsat64(uint64_t __a)
+{
+ if (__flt64(__a, 0ul))
+ return 0ul;
+
+ if (__fge64(__a, 0x3FF0000000000000ul /* 1.0 */))
+ return 0x3FF0000000000000ul;
+
+ return __a;
+}
+
/* Adds the 64-bit value formed by concatenating `a0' and `a1' to the 64-bit
* value formed by concatenating `b0' and `b1'. Addition is modulo 2^64, so
* any carry out is lost. The result is broken into two 32-bit pieces which
case nir_op_ffma:
name = "__ffma64";
break;
+ case nir_op_fsat:
+ name = "__fsat64";
+ break;
default:
return false;
}