diff options
author | Markus Amsler <[email protected]> | 2008-03-17 08:35:37 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2008-03-17 08:35:37 -0600 |
commit | f3c490634ffb8cd2c5329ba1ebfe9c738c2b7441 (patch) | |
tree | 82de55ce2a92536c038be093f5cc3bcd725d2f38 /src/mesa/shader/arbprogparse.c | |
parent | 9425a702bef7d3f601e9ddc2b801f00a3d52dbb8 (diff) |
only set InputsRead bit if input is really used
Diffstat (limited to 'src/mesa/shader/arbprogparse.c')
-rw-r--r-- | src/mesa/shader/arbprogparse.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index e385b9d9973..9e5169eff17 100644 --- 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; } |