]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/compiler.cpp
Combine the precision handling visitors and rewrite the logic
[libs/gl.git] / source / glsl / compiler.cpp
index e8b06c865dece84b471efff19f1608bed56916aa..d8b060ea4e3873285980373e45974ee1b6b84950 100644 (file)
@@ -357,12 +357,8 @@ void Compiler::finalize(Stage &stage, Mode mode)
        {
                LegacyConverter().apply(stage, features);
                resolve(stage, RESOLVE_VARIABLES|RESOLVE_FUNCTIONS);
+               PrecisionConverter().apply(stage);
        }
-
-       if(get_gl_api()==OPENGL_ES2 && mode==PROGRAM)
-               DefaultPrecisionGenerator().apply(stage);
-       else if(mode==MODULE)
-               PrecisionRemover().apply(stage);
 }
 
 void Compiler::inject_block(Block &target, const Block &source)