From: Mikko Rasa Date: Sat, 10 Dec 2016 17:28:42 +0000 (+0200) Subject: Reorder declarations right after injecting the shared scope X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=94c4f0983dcaeae21b911b3a79a9e0eb656fb84a Reorder declarations right after injecting the shared scope This is necesary for InterfaceGenerator to recognize additional inputs in shaders that import a main function with passthrough in it. Otherwise no passthroughs would be generated and those inputs would be unusable in later stages. --- diff --git a/source/programcompiler.cpp b/source/programcompiler.cpp index 5f8c6f9b..14c9d3d3 100644 --- a/source/programcompiler.cpp +++ b/source/programcompiler.cpp @@ -160,6 +160,7 @@ void ProgramCompiler::generate(Stage &stage) { inject_block(stage.content, module->shared.content); + apply(stage); apply(stage); apply(stage); apply(stage);