As can be seen from the giant pile of tests recently sent to the piglit mailing list for review, the lower_variable_index_to_cond_assign pass had some issues. With this updated patch series, *all* of the variable indexing tests posted to the piglit list pass with (classic) swrast and i965.
Patches 1 and 2: same as before Patch 3: Includes some simplifications suggested by Eric Anholt. It is primarily hunk "@@ -61,18 +136,23 @@" that changed. Patches 4 through 7: same as before Patch 8: Completely different approach. It seems that the root problem was the CMP-to-MOV optimization pass done on Mesa IR wasn't reinitializing the now unused source registers. Patches 9 and 10: New patches to the i965 driver that fix the remaining failing piglit test cases. Patches 11 through 13: Allow the non-constant vector index lowering pass to do fewer compares. I don't think these are candidates for 7.11.0, but we may want to cherry pick them for 7.11.1. While this is "just" an optimization, it may make some shaders run on hardware on architectures that have very few instructions to play with (e.g., i915). All of 1 through 10 should be candidates for 7.11 and 7.10 branches now. src/glsl/ir_optimization.h | 4 + src/glsl/lower_variable_index_to_cond_assign.cpp | 303 ++++++++++++++++------ src/glsl/lower_vec_index_to_cond_assign.cpp | 86 +++++-- src/mesa/drivers/dri/i965/brw_vs_emit.c | 23 ++- src/mesa/program/ir_to_mesa.cpp | 14 +- src/mesa/program/prog_optimize.c | 9 + 6 files changed, 332 insertions(+), 107 deletions(-) _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev