Well, I know its the same patch for the third time. I still think its
the correct fix if there are unused ATTRIB declarations
in the program. Dropping them here relieves the drivers of the burden.
The only issue I'm aware of is, that it brings InputsRead and
NumAttributes out of sync. But that's not really a problem since
NumAttriubtes is only used in GetProgramivARB. (Besides
Num{Attributes|Instructions|Temproraries|Parameters} is a story for
itself. The specs say unused ones should be counted. Mesa, old fglrx
counts them, nvidia don't and new fglrx counts some.)
---
src/mesa/shader/arbprogparse.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 10fa196..8803658 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -1616,8 +1616,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;
@@ -2574,6 +2572,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;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev