From: Brian Paul Date: Mon, 2 Feb 2009 23:29:08 +0000 (-0700) Subject: glsl: update program->InputsRead when referencing input attributes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1cb7cd1292dc8592d4912194d91355eb61361be5;p=mesa.git glsl: update program->InputsRead when referencing input attributes This info will be used in the linker for allocating generic vertex attribs. --- diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index ea446fa5d49..2dd122c9a54 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -2120,6 +2120,10 @@ emit_var_ref(slang_emit_info *emitInfo, slang_ir_node *n) /* mark var as used */ _mesa_use_uniform(emitInfo->prog->Parameters, (char *) n->Var->a_name); } + else if (n->Store->File == PROGRAM_INPUT) { + assert(n->Store->Index >= 0); + emitInfo->prog->InputsRead |= (1 << n->Store->Index); + } if (n->Store->Index < 0) { /* probably ran out of registers */