st/mesa: remove duplicate calculation of fp input mapping

This was being calculated the same way in two different places.
Now just do it in st_translate_fragment_program().
This commit is contained in:
Keith Whitwell
2010-02-01 20:42:34 +00:00
parent d51b04320d
commit e1906ae98e
5 changed files with 12 additions and 37 deletions

View File

@@ -60,26 +60,10 @@ static void
translate_fp(struct st_context *st,
struct st_fragment_program *stfp)
{
const GLbitfield fragInputsRead = stfp->Base.Base.InputsRead;
if (!stfp->state.tokens) {
GLuint inAttr, numIn = 0;
for (inAttr = 0; inAttr < FRAG_ATTRIB_MAX; inAttr++) {
if (fragInputsRead & (1 << inAttr)) {
stfp->input_to_slot[inAttr] = numIn;
numIn++;
}
else {
stfp->input_to_slot[inAttr] = -1;
}
}
stfp->num_input_slots = numIn;
assert(stfp->Base.Base.NumInstructions > 0);
st_translate_fragment_program(st, stfp, stfp->input_to_slot);
st_translate_fragment_program(st, stfp);
}
}