From 429c48f064b094d5bb3e010b41aaae8dcabff901 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 31 Mar 2021 22:39:18 +0300 Subject: [PATCH] Fill in the required version if empty Most of the version checks won't trigger for GLSL 1.20 and none will for GLSL 1.10. --- source/glsl/finalize.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/glsl/finalize.cpp b/source/glsl/finalize.cpp index 0725b739..8a525e37 100644 --- a/source/glsl/finalize.cpp +++ b/source/glsl/finalize.cpp @@ -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))); } -- 2.43.0