projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9425a70
)
only set InputsRead bit if input is really used
author
Markus Amsler
<markus.amsler@oribi.org>
Mon, 17 Mar 2008 14:35:37 +0000
(08:35 -0600)
committer
Brian
<brian.paul@tungstengraphics.com>
Mon, 17 Mar 2008 14:35:37 +0000
(08:35 -0600)
src/mesa/shader/arbprogparse.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/arbprogparse.c
b/src/mesa/shader/arbprogparse.c
index e385b9d99736673d28b98b5a9306a7c33b72caf9..9e5169eff177338af43e93338eedfb25c1e4d122 100644
(file)
--- a/
src/mesa/shader/arbprogparse.c
+++ b/
src/mesa/shader/arbprogparse.c
@@
-1576,9
+1576,6
@@
parse_attrib_binding(GLcontext * ctx, const GLubyte ** inst,
if (err) {
program_error(ctx, Program->Position, "Bad attribute binding");
}
- else {
- Program->Base.InputsRead |= (1 << *inputReg);
- }
return err;
}
@@
-2557,6
+2554,11
@@
parse_src_reg (GLcontext * ctx, const GLubyte ** inst,
return 1;
}
+ /* Add attributes to InputsRead only if they are used the program.
+ * This avoids the handling of unused ATTRIB declarations in the drivers. */
+ if (*File == PROGRAM_INPUT)
+ Program->Base.InputsRead |= (1 << *Index);
+
return 0;
}