From a3f4649b2701acb88fed4a7ada2c866ded41466f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 16 Feb 2025 11:23:56 +0900 Subject: [PATCH] [qfcc] Use array count, not the const id for array size Double emission of a constant... that one had me puzzled for a bit: 374? That's not even a multiple of 32! --- tools/qfcc/source/target_spirv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/qfcc/source/target_spirv.c b/tools/qfcc/source/target_spirv.c index 340704410..1c8873ed8 100644 --- a/tools/qfcc/source/target_spirv.c +++ b/tools/qfcc/source/target_spirv.c @@ -624,8 +624,7 @@ static unsigned spirv_TypeArray (const type_t *type, spirvctx_t *ctx) { auto ele_type = dereference_type (type); - auto count_expr = new_int_expr (type_count (type), false); - unsigned count = spirv_value (count_expr, ctx); + unsigned count = type_count (type); unsigned tid = spirv_Type (ele_type, ctx); return spirv_type_array (tid, count, ctx); }