From 94c4f0983dcaeae21b911b3a79a9e0eb656fb84a Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 10 Dec 2016 19:28:42 +0200 Subject: [PATCH] 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. --- source/programcompiler.cpp | 1 + 1 file changed, 1 insertion(+) 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); -- 2.45.2