From 2c2afbedc077f1ef840fa9cb3f469d1db4a40244 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Fri, 18 Oct 2024 17:47:02 +0200 Subject: [PATCH] Do not create types for arrays --- Sources/integrations/kope.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Sources/integrations/kope.c b/Sources/integrations/kope.c index 1c0d58f..5f06c96 100644 --- a/Sources/integrations/kope.c +++ b/Sources/integrations/kope.c @@ -591,10 +591,13 @@ void kope_export(char *directory, api_kind api) { for (global_id i = 0; get_global(i) != NULL && get_global(i)->type != NO_TYPE; ++i) { global *g = get_global(i); - if (is_texture(g->type) || g->type == sampler_type_id) { + + type_id base_type = get_type(g->type)->kind == TYPE_ARRAY ? get_type(g->type)->array.base : g->type; + + if (is_texture(base_type) || base_type == sampler_type_id) { } - else if (!get_type(g->type)->built_in) { - type *t = get_type(g->type); + else if (!get_type(base_type)->built_in) { + type *t = get_type(base_type); char name[256]; if (t->name != NO_NAME) {