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>
This commit is contained in:
Ian Romanick
2013-03-12 12:42:51 -07:00
parent f274a2ca87
commit dafd6918f3
5 changed files with 46 additions and 1 deletions

View File

@@ -1493,6 +1493,7 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
case ir_binop_bfm:
case ir_triop_bfi:
case ir_triop_bitfield_extract:
case ir_triop_vector_insert:
case ir_quadop_bitfield_insert:
assert(!"not supported");
break;