glsl: When lowering non-constant array indexing, respect existing conditions
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 18 Jul 2011 00:33:26 +0000 (17:33 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 23 Jul 2011 08:24:18 +0000 (01:24 -0700)
commit5f83dfe5b70337bcffe215f7c32d0b862b5e7a3b
tree8a18305a6eab6069f145fd0ffead325f9de4861f
parent1731ac308631138ca98d34e8b7070c6e3f981939
glsl: When lowering non-constant array indexing, respect existing conditions

If the non-constant index was in the LHS of an assignment, any
existing condititon on that assignment would be lost.

Fixes i965 piglit:

    fs-temp-array-mat[234]-col-row-wr
    fs-temp-array-mat[234]-index-col-row-wr
    fs-temp-array-mat[234]-index-col-wr
    fs-temp-array-mat[234]-index-row-wr
    vs-varying-array-mat[234]-index-col-wr

Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/lower_variable_index_to_cond_assign.cpp