From 270c57e46e4b578751e9d2315de4a9da999498bd Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 11 Jan 2025 14:33:38 +0900 Subject: [PATCH] [qfcc] Support assignment into array elements in SPIR-V Just a missed detection of needing to use access chains. --- tools/qfcc/source/target_spirv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qfcc/source/target_spirv.c b/tools/qfcc/source/target_spirv.c index 94b795fc3..4d6978caf 100644 --- a/tools/qfcc/source/target_spirv.c +++ b/tools/qfcc/source/target_spirv.c @@ -1484,7 +1484,7 @@ spirv_assign (const expr_t *e, spirvctx_t *ctx) ((expr_t *) e->assign.dst)->id = src; return src; } - if (e->assign.dst->type == ex_field) { + if (e->assign.dst->type == ex_field || e->assign.dst->type == ex_array) { const type_t *res_type; const type_t *acc_type; dst = spirv_access_chain (e->assign.dst, ctx, &res_type, &acc_type);