From 7c42390453e611367cf1ba11446692ec04e0abfb Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Wed, 7 Jul 2010 00:54:33 -0400 Subject: gs: inject const int gl_VerticesIn at link time --- src/mesa/slang/slang_codegen.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/slang/slang_codegen.c') diff --git a/src/mesa/slang/slang_codegen.c b/src/mesa/slang/slang_codegen.c index 494901dc1c8..b2fe5b1f863 100644 --- a/src/mesa/slang/slang_codegen.c +++ b/src/mesa/slang/slang_codegen.c @@ -4191,6 +4191,11 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper) slang_variable *var = _slang_variable_locate(oper->locals, name, GL_TRUE); slang_ir_node *n; if (!var || !var->declared) { + if (A->program->Target == MESA_GEOMETRY_PROGRAM && + !strcmp((char*)name, "gl_VerticesIn") ){ + A->UnresolvedRefs = GL_TRUE; + return NULL; + } slang_info_log_error(A->log, "undefined variable '%s'", (char *) name); return NULL; } -- cgit v1.2.3