X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fcompiler.cpp;h=4c8c1d03d893d277395b2f64b5def34aa7e55168;hb=77f6973f58167d94059d3f324c29ab2ca8de4544;hp=16ac375ca57f05660aa83ae89d9e75b4aff2a941;hpb=b23a9af95c65c01d949153fc49e5091aaa7c3d30;p=libs%2Fgl.git diff --git a/source/glsl/compiler.cpp b/source/glsl/compiler.cpp index 16ac375c..4c8c1d03 100644 --- a/source/glsl/compiler.cpp +++ b/source/glsl/compiler.cpp @@ -93,6 +93,11 @@ void Compiler::compile(Mode mode) for(Stage &s: module->stages) ConstantSpecializer().apply(s, spec_values); } + if(mode==PROGRAM) + { + for(Stage &s: module->stages) + DepthRangeConverter().apply(s, features); + } for(auto i=module->stages.begin(); i!=module->stages.end(); ) { OptimizeResult result = optimize(*i); @@ -299,6 +304,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