summaryrefslogtreecommitdiffstats
path: root/src/mesa/slang/slang_codegen.c
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2010-07-07 00:54:33 -0400
committerZack Rusin <[email protected]>2010-07-08 00:28:29 -0400
commit7c42390453e611367cf1ba11446692ec04e0abfb (patch)
tree379033d3f7659d4214c0808bbc276072685a504c /src/mesa/slang/slang_codegen.c
parent6988f65e43297ae63bbce30bf882f870b370096c (diff)
gs: inject const int gl_VerticesIn at link time
Diffstat (limited to 'src/mesa/slang/slang_codegen.c')
-rw-r--r--src/mesa/slang/slang_codegen.c5
1 files changed, 5 insertions, 0 deletions
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;
}