mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-03 18:10:59 +00:00
[qfcc] Implement swizzle and arrays for spir-v
Arrays done via the field code since they use the same opcode and logic. For now swizzles are just swizzles and don't support zeroing or negating (but doing one or the other (not both) should be easy).
This commit is contained in:
parent
34277b2050
commit
39514e4f3d
6 changed files with 80 additions and 26 deletions
|
@ -51,7 +51,9 @@ get_value (const expr_t *e, int i, int j)
|
|||
}
|
||||
if (type_rows (t) > 1) {
|
||||
auto ind = new_int_expr (j, false);
|
||||
e = array_expr (e, ind);
|
||||
auto a = new_array_expr (e, ind);
|
||||
a->array.type = base_type (t);
|
||||
e = a;
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue