glslang-zig/glslang/MachineIndependent
“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
..
preprocessor Fix ODR violations 2023-08-24 12:48:35 -06:00
attribute.cpp Add --no-link option 2023-09-18 17:31:05 -04:00
attribute.h Add --no-link option 2023-09-18 17:31:05 -04:00
Constant.cpp Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL 2023-07-28 11:49:10 -06:00
gl_types.h 1. fix macro definition value for unsinged-int64-vector, according to kronos spec at https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_gpu_shader_int64.txt; 2. fix typo in reflection 2021-03-15 16:54:31 +08:00
glslang.y Add --no-link option 2023-09-18 17:31:05 -04:00
glslang_tab.cpp Add --no-link option 2023-09-18 17:31:05 -04:00
glslang_tab.cpp.h Add --no-link option 2023-09-18 17:31:05 -04:00
InfoSink.cpp Non-functional: White space after "//", mostly for copyrights. 2017-01-06 12:34:14 -07:00
Initialize.cpp Fix GL_ARB_shader_storage_buffer_object version 2023-11-07 15:56:52 -07:00
Initialize.h Clean the implementation of GL_EXT_texture_shadow_lod. 2023-10-02 15:10:11 -04:00
Intermediate.cpp Out-of-range floats should overflow/underflow to infinity/0.0 2023-11-17 16:30:22 -05:00
intermOut.cpp Add support for GL_NV_displacement_micromap. 2023-10-02 15:07:50 -04:00
IntermTraverse.cpp 8. io mapping refine & qualifier member check & resolver expand (#2396) 2020-11-03 13:34:19 -07:00
iomapper.cpp GL_EXT_spirv_intrinsics: Fix a typo in function naming 2023-11-06 12:50:02 -05:00
iomapper.h Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL 2023-07-28 11:49:10 -06:00
limits.cpp Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL 2023-07-28 11:49:10 -06:00
linkValidate.cpp Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL 2023-07-28 11:49:10 -06:00
LiveTraverser.h also search global variables assignment for live variables 2020-07-20 18:43:00 -04:00
localintermediate.h Fix interpolant ES error 2023-11-11 08:53:16 -07:00
parseConst.cpp Use nullptr where possible instead of NULL or 0 2022-11-30 09:33:28 -07:00
ParseContextBase.cpp Fix interpolant ES error 2023-11-11 08:53:16 -07:00
ParseHelper.cpp Fix interpolant ES error 2023-11-11 08:53:16 -07:00
ParseHelper.h Add --no-link option 2023-09-18 17:31:05 -04:00
parseVersions.h Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL 2023-07-28 11:49:10 -06:00
pch.h Use precompiled headers for some glslang projects 2018-10-31 15:38:08 -05:00
PoolAlloc.cpp Fix ODR violations 2023-08-24 12:48:35 -06:00
propagateNoContraction.cpp Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL 2023-07-28 11:49:10 -06:00
propagateNoContraction.h [lumped builds] Add include guards (#pragma once) to header files that did not have any. 2017-05-10 16:58:38 +03:00
reflection.cpp Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL 2023-07-28 11:49:10 -06:00
reflection.h Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL 2023-07-28 11:49:10 -06:00
RemoveTree.cpp Non-functional: White space after "//", mostly for copyrights. 2017-01-06 12:34:14 -07:00
RemoveTree.h [lumped builds] Add include guards (#pragma once) to header files that did not have any. 2017-05-10 16:58:38 +03:00
Scan.cpp Add support for GL_NV_displacement_micromap. 2023-10-02 15:07:50 -04:00
Scan.h SPV: Fix #1575, fix #1593: Support HLSL #line 2018-12-07 17:36:33 -07:00
ScanContext.h GL_EXT_buffer_reference 2019-01-07 12:36:13 -06:00
ShaderLang.cpp Remove debugOptions from internal classes 2023-10-25 20:13:20 -04:00
SpirvIntrinsics.cpp Use std::variant to represent TSpirvTypeParameter 2023-09-11 21:12:35 -04:00
SymbolTable.cpp Add GL_EXT_texture_shadow_lod support 2023-09-05 19:00:10 -04:00
SymbolTable.h Clean the implementation of GL_EXT_texture_shadow_lod. 2023-10-02 15:10:11 -04:00
Versions.cpp Add support for GL_NV_displacement_micromap. 2023-10-02 15:07:50 -04:00
Versions.h Add support for GL_NV_displacement_micromap. 2023-10-02 15:07:50 -04:00