Some compilers translate mix(a, b, x) to a + (b - a)*x which produces
slightly different results than the form a*(1 - x) + b*x suggested by
the GLSL specification. This change relaxes tests to allow both forms.
Bug:
21110253
Change-Id: I3af056145ef8e64c0fc998302770fd38d105481a
return app<Clamp>(x, minVal, maxVal);
}
-DEFINE_DERIVED_FLOAT3(Mix, mix, x, y, a, (x * (constant(1.0f) - a)) + y * a);
+DEFINE_DERIVED_FLOAT3(Mix, mix, x, y, a, alternatives((x * (constant(1.0f) - a)) + y * a,
+ x + (y - x) * a));
static double step (double edge, double x)
{