Files
engine/tests
chenmo.gl 5ffb3f22df refactor(shader-lab): model generic type families as first-class data
Replace the ad-hoc `resolveGenericReturnType` switch with an explicit
data-driven generic family system. Each family (GenType, GVec4,
GSampler2D, ...) declares its members and the dimension it varies along
(Size / Prefix); overload resolution locks an index per dimension while
walking arguments and projects return families through that lock.

This fixes the underlying defect that produced the texture/textureCube
bugs: the previous algorithm assumed "return family == parameter family"
and collapsed `GVec4 <- GSampler2D` to `SAMPLER2D`. Cross-family
projection (sampler → gvec4) is now a native operation, so the
textureCube/textureCubeLod/texture2D/texture2DLod overloads that the
initial fix listed as concrete-only entries can be written as plain
generic signatures again.

Return type falls through as `TypeAny` when no argument locks the
dimension (all args are TypeAny), preserving wildcard-compatible
overload resolution downstream.

Also exercises the Verbose semantic pass in the two new test shaders —
the initial fix registered them under Release only, which skips
semantic analysis and therefore could not catch the bug it was meant
to prevent.
2026-04-20 16:23:14 +08:00
..
2026-04-17 22:52:07 +08:00