1 # From the GLSL 4.60 spec Section 5.9 (Expressions):
3 # "Dividing by zero does not cause an exception but does
4 # result in an unspecified value."
6 # Here we make sure that constant evaluation doesn't crash on
12 [vertex shader passthrough]
19 // We use a loop specifically to avoid Mesa's GLSL IR
20 // from doing the constant evaluating. In this case
21 // we want to test NIR which exclusively does loop
22 // unrolling on some drivers and will therefore end
23 // up doing the constant evaluation.
24 for (int i = 0; i < 4; i++)
27 gl_FragColor.x = 255.0f / float(j);