i965: Add cases for ir_triop_vector_insert that assert.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 17 May 2013 17:41:27 +0000 (10:41 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 20 May 2013 17:19:48 +0000 (10:19 -0700)
brw_link_shader() unconditionally calls lower_vector_insert() with true
as the second parameter.  This means that both constant and variable
indexed expressions will get lowered, so we should never see this in the
backend.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

index ea714ec47ea016789c1c4dd89a7395c4272e23a9..4afae245d0be302b96c7fbbbf76f4b643e527b8f 100644 (file)
@@ -403,6 +403,7 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
    case ir_unop_unpack_unorm_4x8:
    case ir_unop_unpack_half_2x16:
    case ir_binop_vector_extract:
+   case ir_triop_vector_insert:
    case ir_quadop_bitfield_insert:
    case ir_quadop_vector:
       assert(!"should have been lowered");
index f7dd33304c07138c16551bfe8547e04d49e7f7db..b2f8f009db9c80de4d9c017df721970db41d9680 100644 (file)
@@ -1702,6 +1702,10 @@ vec4_visitor::visit(ir_expression *ir)
       emit(BFE(result_dst, op[2], op[1], op[0]));
       break;
 
+   case ir_triop_vector_insert:
+      assert(!"should have been lowered by lower_vector_insert");
+      break;
+
    case ir_quadop_bitfield_insert:
       assert(!"not reached: should be handled by "
               "bitfield_insert_to_bfm_bfi\n");