Allow min/max/clamp to flush subnormals only during comparison
An implementation may follow the rule that subnormals are flushed
to zero for all arithmetic operations (including comparisons), but
never for mere copies.
In this case, if the input to min/max/clamp contains more than one
subnormal number (including +/-0.0), the returned value may be any
of the subnormal numbers and not really the true minimum/maximum/
clamped value.
This does not hurt real applications, since any subsequent use of
the result will flush it to zero anyway, and it does seem to be
implicitly allowed by the GLSL ES spec.
Change the implementation of min/max/clamp to explicitly handle
the subnormal case in the comparison.
Components: AOSP
VK-GL-CTS issue: 705
Affects:
dEQP-GLES3.functional.shaders.builtin_functions.precision.clamp.*
dEQP-GLES3.functional.shaders.builtin_functions.precision.max.*
dEQP-GLES3.functional.shaders.builtin_functions.precision.min.*
dEQP-GLES31.functional.shaders.builtin_functions.precision.clamp.*
dEQP-GLES31.functional.shaders.builtin_functions.precision.max.*
dEQP-GLES31.functional.shaders.builtin_functions.precision.min.*
Change-Id: I9a5bed9d78e311f96fe03b689299d777050ea063