4 [vertex shader passthrough]
9 uniform float zero = 0.0;
10 uniform float also_zero = 0.0;
11 uniform float billion = 1000000000.0;
12 uniform float flt_max = 3.40282347E+38;
14 out vec4 piglit_fragcolor;
18 float inf = flt_max * flt_max;
19 float also_inf = flt_max * billion;
21 /* Trying very hard to trigger a potential sequence of
22 * optimizations in Mesa's compiler. Specifically, MR !10012
25 * (('ior', ('ior(is_used_once)', ('flt(is_used_once)', a, b), d), ('flt', a, c)),
26 * ('ior', ('flt', a, ('fmax', b, c)), d)),
28 * Since this did not mark the replacement fmin as exact, it could
29 * allow another pattern like
31 * (('~fmax', ('fmin', a, 1.0), 0.0),
32 * ('fsat', a), '!options->lower_fsat'),
34 * This would produce a different result when `c` (in the first
35 * pattern) is NaN. The original max-of-min produces 1, but fsat
36 * produces 0. If 0 < a < 1, then the comparison will produce a
39 float a = gl_FragCoord.x * 0.0001 + 0.0001; /* Always < 1.0 and > 0.0. */
41 float c = min((zero / also_zero) + (inf - also_inf), 1.0);
42 bool d = gl_FragCoord.y > billion; /* Always false. */
44 if ((a < b || d) || (a < c))
45 piglit_fragcolor = vec4(0.0, 1.0, 0.0, 1.0);
47 piglit_fragcolor = vec4(1.0, 0.0, 0.0, 1.0);
52 probe all rgba 0.0 1.0 0.0 1.0