diff options
author | Markus Amsler <markus.amsler@oribi.org> | 2008-03-17 08:35:27 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2008-03-17 08:35:27 -0600 |
commit | f2b914298f677555d1e605cbcc2b7f73c0f0847a (patch) | |
tree | b26d61a70df84884bd28a1bd8253a6e5eef322d8 /src/mesa/shader | |
parent | d787850ae6d60f8287ff320d4da2adf4254589c3 (diff) |
only set InputsRead bit if input is really used
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | 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 10fa196586..8803658c1e 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; } |