Module: Mesa Branch: gallium-mesa-7.4 Commit: d20c53b51126f61d7172812ac67559e1b04ca7b9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d20c53b51126f61d7172812ac67559e1b04ca7b9
Author: Brian Paul <[email protected]> Date: Thu Feb 19 17:00:06 2009 -0700 glsl: update program->InputsRead when referencing input attributes This info will be used in the linker for allocating generic vertex attribs. (cherry picked from master, commit 1cb7cd1292dc8592d4912194d91355eb61361be5) --- src/mesa/shader/slang/slang_emit.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index a9334a4..feff1b7 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -2151,6 +2151,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 */ _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
