From: Mikko Rasa Date: Sat, 12 Nov 2016 16:41:32 +0000 (+0200) Subject: Better handling of array flag for generated interfaces X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=49717d5554becc07a4fafa4f1cbf85ac6ca13907;p=libs%2Fgl.git Better handling of array flag for generated interfaces --- 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;