glslang-zig/glslang
“jimihe” 854db99ff1 Out-of-range floats should overflow/underflow to infinity/0.0
glslang representing literal constants with double precision, so 1.0e40 and 1.0e-50 are normal values.

        Shader1:
        precision highp float;
        out vec4 my_FragColor;
        void main()
        {
        // Out-of-range floats should overflow to infinity
        // GLSL ES 3.00.6 section 4.1.4 Floats:
        // "If the value of the floating point number is too large (small) to be stored as a single precision value, it is converted to positive (negative) infinity"
        float correct = isinf(1.0e40) ? 1.0 : 0.0;
        my_FragColor = vec4(0.0, correct, 0.0, 1.0);
        }
        The expected ouput result of this test is vec4(0.0, 1.0, 0.0, 1.0),
        but it's vec4(0.0,0.0,0.0,1.0).Because the return value of isInf is
        false.

        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;
        my_FragColor = vec4(0.0, correct, 0.0, 1.0);
        }
        The expected ouput result of this test is vec4(0.0, 1.0, 0.0, 1.0),
        but it's vec4(0.0,0.0,0.0,1.0).

        For f32 and f16 type, when the literal constant out of range of the f32
        and f16 number, the value should overflow or underflow to inf or zero.

            glcts test item
        KHR-GLES3.number_parsing.float_out_of_range_as_infinity
2023-11-17 16:30:22 -05:00
..
CInterface Use custom callbacks if they are available in 'i->callbacks' 2023-05-09 10:38:08 -06:00
ExtensionHeaders Revert port of GL_EXT_shader_realtime_clock to GL_EXT_spirv_intrinsics 2021-11-11 23:39:47 -07:00
GenericCodeGen Remove debugOptions from internal classes 2023-10-25 20:13:20 -04:00
HLSL Add --no-link option 2023-09-18 17:31:05 -04:00
Include GL_EXT_spirv_intrinsics: Fix a typo in function naming 2023-11-06 12:50:02 -05:00
MachineIndependent Out-of-range floats should overflow/underflow to infinity/0.0 2023-11-17 16:30:22 -05:00
OSDependent Replace GlobalLock functions with std::mutex 2023-07-31 20:12:51 -06:00
Public Remove debugOptions from internal classes 2023-10-25 20:13:20 -04:00
ResourceLimits move ResourceLimits from StandAlone to glslang dir (Fix #3064) 2023-02-15 20:06:26 +01:00
CMakeLists.txt cmake: only install public headers 2023-11-11 08:55:43 -07:00
updateGrammar Remove glslang.m4 2023-07-28 15:14:48 -06:00