mesa: Fix remove_instructions to successfully remove when removeFlags[0].

This fixes the dead code elimination to work on the particular code
mentioned in the previous commit.
This commit is contained in:
Eric Anholt 2009-11-06 13:04:54 -08:00
parent e4e312d493
commit f3cacfe216

View file

@ -73,6 +73,12 @@ remove_instructions(struct gl_program *prog, const GLboolean *removeFlags)
}
}
}
/* Finish removing if the first instruction was to be removed. */
if (removeCount > 0) {
GLint removeStart = removeEnd - removeCount + 1;
_mesa_delete_instructions(prog, removeStart, removeCount);
removeStart = removeCount = 0; /* reset removal info */
}
return totalRemoved;
}