]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compiler.cpp
Emit a max invocations exec mode for geometry shaders
[libs/gl.git] / source / glsl / compiler.cpp
index 0e26a16353b46bf1ae73876fc08be92b20621b2d..f1ab6d088e4e1bdedd5d4188685ef2f6a55f02e0 100644 (file)
@@ -209,11 +209,11 @@ const SourceMap &Compiler::get_source_map() const
        return module->source_map;
 }
 
-string Compiler::get_stage_debug(Stage::Type stage_type) const
+string Compiler::get_stage_debug(Stage::Type stage_type, bool use_colors) const
 {
        auto i = find_member(module->stages, stage_type, &Stage::type);
        if(i!=module->stages.end())
-               return DumpTree().apply(*i);
+               return DumpTree(use_colors).apply(*i);
        throw key_error(Stage::get_stage_name(stage_type));
 }
 
@@ -299,6 +299,9 @@ void Compiler::generate(Stage &stage)
        variables through interfaces. */
        InterfaceGenerator().apply(stage);
        resolve(stage, RESOLVE_BLOCKS|RESOLVE_TYPES|RESOLVE_VARIABLES);
+
+       ArraySizer().apply(stage);
+       resolve(stage, RESOLVE_EXPRESSIONS);
 }
 
 template<typename T>