[qfcc] Check rows/columns for type promotion

There's no automatic type promotion between scalars, vectors or matrices
of different component counts.
This commit is contained in:
Bill Currie 2025-01-14 13:20:12 +09:00
parent 2f3097aed7
commit 376f8f2c09

View file

@ -1779,6 +1779,10 @@ type_promotes (const type_t *dst, const type_t *src)
if (!is_math (dst) || !is_math (src)) {
return false;
}
if (type_cols (dst) != type_cols (src)
|| type_rows (dst) != type_rows (src)) {
return false;
}
if (is_bool (src)) {
return !is_short (dst) && !is_ushort (dst);