From 6cb4cc995865935d22b276801c218d2dcf49cebd Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 13 Mar 2021 15:56:19 +0200 Subject: [PATCH] Don't require builtin inputs to be linked Many of them provide access to external values from the API. --- source/glsl/validate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } -- 2.45.2