]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compiler.cpp
Make constant id range configurable and avoid duplicates
[libs/gl.git] / source / glsl / compiler.cpp
index fab054737a8872bc7e8631b2298615c0fc9b6cf0..5ff003e71722e5da09d0cda8786bbca89f7726f8 100644 (file)
@@ -80,6 +80,7 @@ void Compiler::compile(Mode mode)
 {
        for(list<Stage>::iterator i=module->stages.begin(); i!=module->stages.end(); ++i)
                generate(*i);
+       ConstantIdAssigner().apply(*module, features);
 
        bool valid = true;
        for(list<Stage>::iterator i=module->stages.begin(); i!=module->stages.end(); ++i)
@@ -267,8 +268,6 @@ void Compiler::generate(Stage &stage)
        variables through interfaces. */
        InterfaceGenerator().apply(stage);
        resolve(stage, RESOLVE_BLOCKS|RESOLVE_TYPES|RESOLVE_VARIABLES);
-
-       ConstantIdAssigner().apply(stage);
 }
 
 template<typename T>