KhronosGroup / KhronosGroup/glslang

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

Open Beginner friendly
#4,312 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
3.6k
Forks
989
Avg merge
1d 2h
Merged PRs (30d)
31

Description

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

https://github.com/KhronosGroup/glslang/blob/20960a4872f681e4213312b06b48cc4ddae3c73d/glslang/MachineIndependent/Initialize.cpp#L4421-L4424

**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.

Contributor guide

Open the contributing guide

Research direction

Open glslang/MachineIndependent/Initialize.cpp around line 4423 and compare the i16vec3 declaration with the scalar, f16vec2, and f16vec4 overloads. Correct the misspelled builtin name, then verify that the f16vec3 halfBitsToInt16 overload is registered consistently with the existing operator name.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.