From 49717d5554becc07a4fafa4f1cbf85ac6ca13907 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 12 Nov 2016 18:41:32 +0200 Subject: [PATCH] Better handling of array flag for generated interfaces --- source/programcompiler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/programcompiler.cpp b/source/programcompiler.cpp index f7d23161..096a5d84 100644 --- a/source/programcompiler.cpp +++ b/source/programcompiler.cpp @@ -491,8 +491,12 @@ bool ProgramCompiler::InterfaceGenerator::generate_interface(VariableDeclaration iface_var->type = var.type; iface_var->type_declaration = var.type_declaration; iface_var->name = name; - iface_var->array = (var.array || (stage->type==GEOMETRY && iface=="in")); - iface_var->array_size = var.array_size; + if(stage->type==GEOMETRY) + iface_var->array = ((var.array && var.interface!="in") || iface=="in"); + else + iface_var->array = var.array; + if(iface_var->array) + iface_var->array_size = var.array_size; if(iface=="in") iface_var->linked_declaration = &var; iface_declarations[name] = iface_var; -- 2.45.2