From bfed4410450e7a633ba8d1fe8da1f478b72e7a25 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 21 Jan 2025 13:25:02 +0900 Subject: [PATCH] [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. --- tools/qfcc/source/target_spirv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/qfcc/source/target_spirv.c b/tools/qfcc/source/target_spirv.c index d3830a781..0f3d83364 100644 --- a/tools/qfcc/source/target_spirv.c +++ b/tools/qfcc/source/target_spirv.c @@ -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,