return nir_bcsel(b, nir_ieq(b, s, nir_imm_intN_t(b, 0, s->bit_size)), x, y);
}
+static inline nir_ssa_def *
+nir_ftan(nir_builder *b, nir_ssa_def *x)
+{
+ return nir_fdiv(b, nir_fsin(b, x), nir_fcos(b, x));
+}
+
static inline nir_ssa_def *
nir_clz_u(nir_builder *b, nir_ssa_def *a)
{
val->ssa->def = nir_degrees(nb, src[0]);
return;
case GLSLstd450Tan:
- val->ssa->def = nir_fdiv(nb, nir_fsin(nb, src[0]),
- nir_fcos(nb, src[0]));
+ val->ssa->def = nir_ftan(nb, src[0]);
return;
case GLSLstd450Modf: {