[qfcc] Handle list expressions in spirv codegen

It seems they get there in declarations in inline functions. I decided
it's not worth worrying about for now.
This commit is contained in:
Bill Currie 2025-01-21 13:25:02 +09:00
parent b25e64591f
commit bfed441045

View file

@ -1755,6 +1755,15 @@ spirv_extend (const expr_t *e, spirvctx_t *ctx)
return id;
}
static unsigned
spirv_list (const expr_t *e, spirvctx_t *ctx)
{
for (auto le = e->list.head; le; le = le->next) {
spirv_emit_expr (le->expr, ctx);
}
return 0;
}
static unsigned
spirv_incop (const expr_t *e, spirvctx_t *ctx)
{
@ -1939,6 +1948,7 @@ spirv_emit_expr (const expr_t *e, spirvctx_t *ctx)
[ex_return] = spirv_return,
[ex_swizzle] = spirv_swizzle,
[ex_extend] = spirv_extend,
[ex_list] = spirv_list,
[ex_incop] = spirv_incop,
[ex_cond] = spirv_cond,
[ex_field] = spirv_field_array,