Commit 3000cba1 authored by Chad Versace's avatar Chad Versace
Browse files

glsl-1.xx: Add more division-by-zero tests for float and int

For language versions:
1.00
1.10
1.30
parent ab7ea2f7
// [config]
// expect_result: pass
// glsl_version: 1.00
// [end config]
//
// Division by zero is legal for floating point values.
//
// From section 5.9 of the GLSL ES 1.00 spec:
// Dividing by zero does not cause an exception but does result in an
// unspecified value.
#version 100
float
f() {
float x = 1.0 / 0.0;
return x;
}
// [config]
// expect_result: pass
// glsl_version: 1.00
// [end config]
//
// Division by zero is legal for integer values.
//
// From section 5.9 of the GLSL ES 1.00 spec:
// Dividing by zero does not cause an exception but does result in an
// unspecified value.
#version 100
int
f() {
int x = 1 / 0;
return x;
}
// [config]
// expect_result: pass
// glsl_version: 1.10
// [end config]
//
// Division by zero is legal for floating point values.
//
// From section 5.9 of the GLSL 1.10 spec:
// Dividing by zero does not cause an exception but does result in an
// unspecified value.
#version 110
float
f() {
float x = 1.0 / 0.0;
return x;
}
// [config]
// expect_result: pass
// glsl_version: 1.10
// [end config]
//
// Division by zero is legal for integer values.
//
// From section 5.9 of the GLSL 1.10 spec:
// Dividing by zero does not cause an exception but does result in an
// unspecified value.
#version 110
int
f() {
int x = 1 / 0;
return x;
}
// [config]
// expect_result: pass
// glsl_version: 1.30
// [end config]
//
// Division by zero is legal for floating point values.
//
// From section 5.9 of the GLSL 1.30 spec:
// Dividing by zero does not cause an exception but does result in an
// unspecified value.
#version 130
float
f() {
float x = 1.0 / 0.0;
return x;
}
// [config]
// expect_result: pass
// glsl_version: 1.30
// [end config]
//
// Division by zero is legal for integer values.
//
// From section 5.9 of the GLSL 1.30 spec:
// Dividing by zero does not cause an exception but does result in an
// unspecified value.
#version 130
int
f() {
int x = 1 / 0;
return x;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment