Module: Mesa Branch: master Commit: e1e887679786cf3882e83b2a194f046b34a71f05 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e1e887679786cf3882e83b2a194f046b34a71f05
Author: Kenneth Graunke <kenn...@whitecape.org> Date: Fri May 17 10:33:40 2013 -0700 i965: Add cases for ir_binop_vector_extract that assert. do_vec_index_to_swizzle() should remove any vector extract operations with a constant index. It's unconditionally called from do_common_optimization(). do_vec_index_to_cond_assign() should remove the rest, and it is unconditionally called from brw_link_shader(). This means that we should never see ir_binop_vector_extract in the backend. Silences compiler warnings. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Matt Turner <matts...@gmail.com> --- .../dri/i965/brw_fs_channel_expressions.cpp | 1 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp index 0f3d4ab..ea714ec 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp @@ -402,6 +402,7 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir) case ir_unop_unpack_unorm_2x16: case ir_unop_unpack_unorm_4x8: case ir_unop_unpack_half_2x16: + case ir_binop_vector_extract: case ir_quadop_bitfield_insert: case ir_quadop_vector: assert(!"should have been lowered"); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index f14529a..f7dd333 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -1671,6 +1671,10 @@ vec4_visitor::visit(ir_expression *ir) break; } + case ir_binop_vector_extract: + assert(!"should have been lowered by vec_index_to_cond_assign"); + break; + case ir_triop_lrp: op[0] = fix_3src_operand(op[0]); op[1] = fix_3src_operand(op[1]); _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit