]> git.tdb.fi Git - libs/gl.git/commitdiff
Fill in the required version if empty
authorMikko Rasa <tdb@tdb.fi>
Wed, 31 Mar 2021 19:39:18 +0000 (22:39 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 31 Mar 2021 19:39:18 +0000 (22:39 +0300)
Most of the version checks won't trigger for GLSL 1.20 and none will for
GLSL 1.10.

source/glsl/finalize.cpp

index 0725b7394213f9defb1553d728425009c1d66567..8a525e378cc0c990b41b53071538602b9ccbb768 100644 (file)
@@ -89,7 +89,12 @@ void LegacyConverter::apply(Stage &s, const Features &feat)
        stage = &s;
        features = feat;
        if(supports_stage(s.type))
+       {
                s.content.visit(*this);
+
+               if(!stage->required_features.glsl_version)
+                       stage->required_features.glsl_version = Version(1, (stage->required_features.gl_api==OPENGL_ES2 ? 0 : 10));
+       }
        else
                unsupported(format("Stage %s is not supported", Stage::get_stage_name(s.type)));
 }