glsl: Convert ir_binop_vector_extract in the LHS to ir_triop_vector_insert
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 16 Mar 2013 01:06:11 +0000 (18:06 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 13 May 2013 19:05:19 +0000 (12:05 -0700)
commit89704eb1b019d42c949e6e08a8cb8bacbacbf63b
treef841750949f5751948f8cee5d0dcd6a3367c4701
parentee7a6dad302ff5568566e325df56fd582be1afec
glsl: Convert ir_binop_vector_extract in the LHS to ir_triop_vector_insert

The ast_array_index code can't know whether to generate an
ir_binop_vector_extract or an ir_triop_vector_insert.  Instead it will
always generate ir_binop_vector_extract, and the LHS and RHS have to be
re-written.

v2: Convert tabs to spaces.  Suggested by Eric.

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/ast_to_hir.cpp