X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fvalidate.cpp;h=d154388f98cd9eed44aa8d16c00e1e70d09f801c;hb=3c8ce91bc0434b3a25eb919fc490c6ff8a8ed67e;hp=7e5f295f165ac3eda0993a7767b2b29fa9b6bbc5;hpb=d3a41542c4982d6df08b5e6f969267f9c8889f9f;p=libs%2Fgl.git diff --git a/source/glsl/validate.cpp b/source/glsl/validate.cpp index 7e5f295f..d154388f 100644 --- a/source/glsl/validate.cpp +++ b/source/glsl/validate.cpp @@ -216,6 +216,8 @@ void DeclarationValidator::visit(VariableDeclaration &var) { if(scope==STRUCT || scope==INTERFACE_BLOCK) error(var, format("Constant qualifier not allowed on %s", descr)); + if(!var.init_expression) + error(var, "Constant variable must have an initializer"); } if(!var.interpolation.empty() || !var.sampling.empty())