OSDN Git Service

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>
Thu, 28 Jul 2011 18:47:44 +0000 (11:47 -0700)
commitaad12d15bb2ba75d5c0cdb0b3aa1398cdf60a9a5
tree3048e33bf1970f0b20999f78a404205fa09aaa47
parent977db7cc65fa1daf2a25b11cd3d17af8893e6e76
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>
(cherry picked from commit 5f83dfe5b70337bcffe215f7c32d0b862b5e7a3b)
src/glsl/lower_variable_index_to_cond_assign.cpp