glsl: Add ir_triop_vector_insert
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 12 Mar 2013 19:42:51 +0000 (12:42 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 13 May 2013 19:05:18 +0000 (12:05 -0700)
commitdafd6918f305274c8374bf9d427d90a3dabe13cb
treeffedaac8613427a35f801b23cc8865583655a130
parentf274a2ca8733059bdd4f1c456ed4f6df7d7ec008
glsl: Add ir_triop_vector_insert

The new opcode is used to generate a new vector with a single field from
the source vector replaced.  This will eventually replace
ir_dereference_array of vectors in the LHS of assignments.

v2: Convert tabs to spaces.  Suggested by Eric.

v3: Add constant expression handling for ir_triop_vector_insert.  This
prevents the constant matrix inversion tests from regressing.  Duh.

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/ir.cpp
src/glsl/ir.h
src/glsl/ir_constant_expression.cpp
src/glsl/ir_validate.cpp
src/mesa/program/ir_to_mesa.cpp