1 # Attempts to recreate a a bug in an algebraic optimization added in
2 # 07cd30ca293 ("nir/opt_algebraic: optimize fmax(-fmin(b, a), b) ->
7 [vertex shader passthrough]
16 float c = max(-min(a, b), b);
18 // The wrong answer for the bug this is trying to reproduce is -15.
19 // For that specific case, the test will produce medium (15/35) green.
20 if (c <= 0.0 || c > 35.0)
21 gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
23 gl_FragColor = vec4(0.0, c / 35.0 , 0.0, 1.0);
27 clear color 0.2 0.2 0.2 0.2
34 probe all rgba 0.0 1.0 0.0 1.0