diff options
author | Eric Anholt <[email protected]> | 2011-06-24 12:11:35 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-06-29 15:09:08 -0700 |
commit | e75b5954db52723a8590cd321b1998a079e9c1d4 (patch) | |
tree | 1ab18eda6c8a1043ca9b3a86802c9f6c2d2d7ad7 | |
parent | d44f821213d7ed67fed18d6ea6c34b61a665c89e (diff) |
glsl: Drop explicit types of lower_mat_op_to_vec expressions.
The constructor can figure it out for us these days.
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/glsl/lower_mat_op_to_vec.cpp | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/src/glsl/lower_mat_op_to_vec.cpp b/src/glsl/lower_mat_op_to_vec.cpp index 8cbbfa713c9..bf3915ef95f 100644 --- a/src/glsl/lower_mat_op_to_vec.cpp +++ b/src/glsl/lower_mat_op_to_vec.cpp @@ -144,7 +144,6 @@ ir_mat_op_to_vec_visitor::do_mul_mat_mat(ir_variable *result_var, /* first column */ expr = new(mem_ctx) ir_expression(ir_binop_mul, - a->type, a, b); @@ -156,11 +155,9 @@ ir_mat_op_to_vec_visitor::do_mul_mat_mat(ir_variable *result_var, b = get_element(b_var, b_col, i); mul_expr = new(mem_ctx) ir_expression(ir_binop_mul, - a->type, a, b); expr = new(mem_ctx) ir_expression(ir_binop_add, - a->type, expr, mul_expr); } @@ -186,7 +183,6 @@ ir_mat_op_to_vec_visitor::do_mul_mat_vec(ir_variable *result_var, /* first column */ expr = new(mem_ctx) ir_expression(ir_binop_mul, - result_var->type, a, b); @@ -198,13 +194,9 @@ ir_mat_op_to_vec_visitor::do_mul_mat_vec(ir_variable *result_var, b = get_element(b_var, 0, i); mul_expr = new(mem_ctx) ir_expression(ir_binop_mul, - result_var->type, a, b); - expr = new(mem_ctx) ir_expression(ir_binop_add, - result_var->type, - expr, - mul_expr); + expr = new(mem_ctx) ir_expression(ir_binop_add, expr, mul_expr); } ir_rvalue *result = new(mem_ctx) ir_dereference_variable(result_var); @@ -232,7 +224,6 @@ ir_mat_op_to_vec_visitor::do_mul_vec_mat(ir_variable *result_var, result = new(mem_ctx) ir_swizzle(result, i, 0, 0, 0, 1); column_expr = new(mem_ctx) ir_expression(ir_binop_dot, - result->type, a, b); @@ -258,7 +249,6 @@ ir_mat_op_to_vec_visitor::do_mul_mat_scalar(ir_variable *result_var, ir_assignment *column_assign; column_expr = new(mem_ctx) ir_expression(ir_binop_mul, - result->type, a, b); @@ -307,8 +297,7 @@ ir_mat_op_to_vec_visitor::do_equal_mat_mat(ir_variable *result_var, ir_dereference *const op1 = get_column(b_var, i); ir_expression *const cmp = - new(this->mem_ctx) ir_expression(ir_binop_any_nequal, - glsl_type::bool_type, op0, op1); + new(this->mem_ctx) ir_expression(ir_binop_any_nequal, op0, op1); ir_dereference *const lhs = new(this->mem_ctx) ir_dereference_variable(tmp_bvec); @@ -319,17 +308,11 @@ ir_mat_op_to_vec_visitor::do_equal_mat_mat(ir_variable *result_var, this->base_ir->insert_before(assign); } - ir_rvalue *const val = - new(this->mem_ctx) ir_dereference_variable(tmp_bvec); - - ir_expression *any = - new(this->mem_ctx) ir_expression(ir_unop_any, glsl_type::bool_type, - val, NULL); + ir_rvalue *const val = new(this->mem_ctx) ir_dereference_variable(tmp_bvec); + ir_expression *any = new(this->mem_ctx) ir_expression(ir_unop_any, val); if (test_equal) - any = new(this->mem_ctx) ir_expression(ir_unop_logic_not, - glsl_type::bool_type, - any, NULL); + any = new(this->mem_ctx) ir_expression(ir_unop_logic_not, any); ir_rvalue *const result = new(this->mem_ctx) ir_dereference_variable(result_var); @@ -406,10 +389,7 @@ ir_mat_op_to_vec_visitor::visit_leave(ir_assignment *orig_assign) ir_expression *column_expr; ir_assignment *column_assign; - column_expr = new(mem_ctx) ir_expression(orig_expr->operation, - result->type, - op0, - NULL); + column_expr = new(mem_ctx) ir_expression(orig_expr->operation, op0); column_assign = new(mem_ctx) ir_assignment(result, column_expr, @@ -438,7 +418,6 @@ ir_mat_op_to_vec_visitor::visit_leave(ir_assignment *orig_assign) ir_assignment *column_assign; column_expr = new(mem_ctx) ir_expression(orig_expr->operation, - result->type, op0, op1); |