Mesa (master): glsl: update program-> InputsRead when referencing input attributes
Brian Paul
brianp at kemper.freedesktop.org
Mon Feb 2 23:52:20 UTC 2009
Module: Mesa
Branch: master
Commit: 1cb7cd1292dc8592d4912194d91355eb61361be5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1cb7cd1292dc8592d4912194d91355eb61361be5
Author: Brian Paul <brianp at vmware.com>
Date: Mon Feb 2 16:29:08 2009 -0700
glsl: update program->InputsRead when referencing input attributes
This info will be used in the linker for allocating generic vertex attribs.
---
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 ea446fa..2dd122c 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 */
More information about the mesa-commit
mailing list