From: Mikko Rasa Date: Sat, 13 Mar 2021 13:56:19 +0000 (+0200) Subject: Don't require builtin inputs to be linked X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=6cb4cc995865935d22b276801c218d2dcf49cebd;p=libs%2Fgl.git Don't require builtin inputs to be linked Many of them provide access to external values from the API. --- diff --git a/source/glsl/validate.cpp b/source/glsl/validate.cpp index 6e90698c..13cb5ccb 100644 --- a/source/glsl/validate.cpp +++ b/source/glsl/validate.cpp @@ -216,7 +216,7 @@ void ReferenceValidator::visit(VariableReference &var) { if(!var.declaration) error(var, format("Use of undeclared variable '%s'", var.name)); - else if(stage->type!=Stage::VERTEX && var.declaration->interface=="in" && !var.declaration->linked_declaration) + else if(stage->type!=Stage::VERTEX && var.declaration->interface=="in" && var.name.compare(0, 3, "gl_") && !var.declaration->linked_declaration) error(var, format("Use of unlinked input variable '%s'", var.name)); }