#1158·makepad

GLSL ES3 vertex shader compile failure: mangled unpack-helper names (regression in 99c6a3db)

Author: SilenceNoobCreated Aug 2, 2026Updated Aug 2, 2026

Environment

  • Linux, NVIDIA GL driver 610.43.03, OpenGL ES 3.2, GLSL ES 3.20 (backend: Wayland)
  • Commit: 0e7f7a7 (dev HEAD, 2026-08-02)

Symptom

App panics at startup with ERROR::SHADER::VERTEX::COMPILATION_FAILED (platform/src/os/linux/opengl.rs:1537). The failing shader is the vector (DrawSvg) vertex shader.

Root cause

In the generated GLSL, io_vertex() calls 00000361f4469aa0(...) and 000038d572795758(...) instead of the _mp_unpack2f16 / _mp_unpack4u8 wrappers defined in the preamble (lines 61-62 of the dumped shader). The mangled identifiers start with a digit, so the GLSL compiler parses them as invalid numeric constants:

0(135) : error C0209: floating point constant must have exponent when no decimal point is present
0(135) : error C0159: invalid char 'a' in integer constant suffix
0(135) : error C0159: invalid char 'a' in integer constant suffix
0(135) : error C7011: implicit cast from "float" to "vec2"
0(135) : error C0000: syntax error, unexpected integer constant, expecting ',' or ';' at token "<int-const>"
0(136) : error C0158: invalid digit '8' in octal constant
0(136) : error C7011: implicit cast from "int" to "vec4"
...

Generated GLSL fragment

Preamble (correct):

glsl
vec2 _mp_unpack2f16(float x){ return unpackHalf2x16(floatBitsToUint(x)); }
vec4 _mp_unpack4u8(float x){ return unpackUnorm4x8(floatBitsToUint(x)); }

io_vertex() body (lines 135-139, broken):

glsl
vec2 l_g_uv = 00000361f4469aa0(vb_geom.uv);
vec4 l_g_color = 000038d572795758(vb_geom.color);
vec2 l_g_p0s = 00000361f4469aa0(vb_geom.p0s);
vec2 l_g_p12 = 00000361f4469aa0(vb_geom.p12);
vec2 l_g_p3c = 00000361f4469aa0(vb_geom.p3c);

Regression

Introduced by 99c6a3db "Shader: unpack2f16/unpack4u8 on all backends — GLSL ES3 built-ins, WGSL mapping, headless Rust impls" (2026-08-02). The parent commit 5d4483f6 (2026-07-31) renders fine — same app, same driver.

Expected

The mangled names should be valid identifiers (or the _mp_* wrapper names kept as-is) so the GLSL compiles.