Improve overflow_underflow_toinf_0 test somewhat
Add test cases that will make explicit ±0.0 and ±INF appear in the AST output to make sure those cases are handled correctly.
This commit is contained in:
parent
a187f47e2c
commit
a1138bacff
2 changed files with 38 additions and 21 deletions
|
|
@ -1,12 +1,13 @@
|
|||
#version 320 es
|
||||
precision highp float;
|
||||
out vec4 my_FragColor;
|
||||
void main()
|
||||
{
|
||||
#version 320 es
|
||||
precision highp float;
|
||||
out vec4 my_FragColor;
|
||||
void main()
|
||||
{
|
||||
// GLSL ES 3.00.6 section 4.1.4 Floats:
|
||||
// "A value with a magnitude too small to be represented as a mantissa and exponent is converted to zero."
|
||||
// 1.0e-50 is small enough that it can't even be stored as subnormal.
|
||||
float correct = (1.0e-50 == 0.0) ? 1.0 : 0.0;
|
||||
float correct1 = isinf(1.0e40) ? 1.0 : 0.0;
|
||||
float correct1 = isinf(1.0e40) ? 1.0 : 0.0;
|
||||
vec4 foo = vec4(1.0e-50, -1.0e-50, 1.0e50, -1.0e50);
|
||||
my_FragColor = vec4(0.0, correct, correct1, 1.0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue