Skip to content

Invalid name - halhBitsToInt16 instead halfBitsToInt16 in glslang/MachineIndependent/Initialize.cpp #4312

Description

@qarmin

Issue found by AI, validated by me - full report can be found here - https://github.com/qarmin/ClaudeReports/blob/master/glslang_20260622.html

"int16_t halfBitsToInt16(float16_t);"
"i16vec2 halfBitsToInt16(f16vec2);"
"i16vec3 halhBitsToInt16(f16vec3);"
"i16vec4 halfBitsToInt16(f16vec4);"

Description: Typo in a builtin function name: the i16vec3 overload of halfBitsToInt16 is declared as 'halhBitsToInt16' (note 'halh'). The scalar, f16vec2 and f16vec4 overloads are spelled correctly. As a result there is no 'i16vec3 halfBitsToInt16(f16vec3)' prototype, so calling halfBitsToInt16 on an f16vec3 has no matching overload, while a bogus name 'halhBitsToInt16' is registered that is never wired to any operator (relateToOperator only references 'halfBitsToInt16').

Locations:

glslang/MachineIndependent/Initialize.cpp:4423
 4423 |             "i16vec3 halhBitsToInt16(f16vec3);"

Fix: Change 'halhBitsToInt16' to 'halfBitsToInt16' on line 4423.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions