aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/compiler/arithmetic-operators/division-by-zero-01.frag
blob: 97a6122c187c93be3b3c7c7d833a36a9a0c198a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// [config]
// expect_result: pass
// glsl_version: 1.10
// glsles_version: 1.00
// [end config]
//
// Division by zero is legal for floating point values.
//
// From section 5.9 of the GLSL ES 1.00.17 spec:
//     Dividing by zero does not cause an exception but does result in an
//     unspecified value.

float
f() {
    float x = 1.0 / 0.0;
    return x;
}