mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
[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:
parent
2f3097aed7
commit
376f8f2c09
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue