glsl: Refactor part of convert_vec_index_to_cond_assign
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 6 Mar 2013 01:47:35 +0000 (17:47 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 13 May 2013 19:05:18 +0000 (12:05 -0700)
commit63e1147ea12a393c0750698ea5909f41e1953e75
tree0fae6da3bfe9327cc2c2b0c857096a46b32a418a
parentdafd6918f305274c8374bf9d427d90a3dabe13cb
glsl: Refactor part of convert_vec_index_to_cond_assign

Use a first function that extract the vector being indexed and the index
from the deref.  Call the second function that does the real work.

Coming patches will add a new ir_expression for variable indexing into a
vector.  Having the lowering pass split into two functions will make it
much easier to lower the new ir_expression.

v2: Convert tabs to spaces.  Suggested by Eric.

v3: Move some bits from a later patch back to this patch so that it
actually compiles.  Suggested by Ken.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/lower_vec_index_to_cond_assign.cpp