glsl: Drop the extra NULL specifiction on ir_assignment constructors.
It's an implied argument, and I don't think being explicit about it
helps.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 998f8dd..e23718b 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -760,13 +760,11 @@
ir_var_temporary);
ir_dereference_variable *deref_var = new(ctx) ir_dereference_variable(var);
instructions->push_tail(var);
- instructions->push_tail(new(ctx) ir_assignment(deref_var,
- rhs,
- NULL));
+ instructions->push_tail(new(ctx) ir_assignment(deref_var, rhs));
deref_var = new(ctx) ir_dereference_variable(var);
if (!error_emitted)
- instructions->push_tail(new(ctx) ir_assignment(lhs, deref_var, NULL));
+ instructions->push_tail(new(ctx) ir_assignment(lhs, deref_var));
return new(ctx) ir_dereference_variable(var);
}
@@ -783,7 +781,7 @@
var->mode = ir_var_auto;
instructions->push_tail(new(ctx) ir_assignment(new(ctx) ir_dereference_variable(var),
- lvalue, NULL));
+ lvalue));
return new(ctx) ir_dereference_variable(var);
}
@@ -1223,12 +1221,12 @@
stmt->then_instructions.append_list(&rhs_instructions);
ir_dereference *const then_deref = new(ctx) ir_dereference_variable(tmp);
ir_assignment *const then_assign =
- new(ctx) ir_assignment(then_deref, op[1], NULL);
+ new(ctx) ir_assignment(then_deref, op[1]);
stmt->then_instructions.push_tail(then_assign);
ir_dereference *const else_deref = new(ctx) ir_dereference_variable(tmp);
ir_assignment *const else_assign =
- new(ctx) ir_assignment(else_deref, new(ctx) ir_constant(false), NULL);
+ new(ctx) ir_assignment(else_deref, new(ctx) ir_constant(false));
stmt->else_instructions.push_tail(else_assign);
result = new(ctx) ir_dereference_variable(tmp);
@@ -1258,13 +1256,13 @@
ir_dereference *const then_deref = new(ctx) ir_dereference_variable(tmp);
ir_assignment *const then_assign =
- new(ctx) ir_assignment(then_deref, new(ctx) ir_constant(true), NULL);
+ new(ctx) ir_assignment(then_deref, new(ctx) ir_constant(true));
stmt->then_instructions.push_tail(then_assign);
stmt->else_instructions.append_list(&rhs_instructions);
ir_dereference *const else_deref = new(ctx) ir_dereference_variable(tmp);
ir_assignment *const else_assign =
- new(ctx) ir_assignment(else_deref, op[1], NULL);
+ new(ctx) ir_assignment(else_deref, op[1]);
stmt->else_instructions.push_tail(else_assign);
result = new(ctx) ir_dereference_variable(tmp);
@@ -1452,14 +1450,14 @@
ir_dereference *const then_deref =
new(ctx) ir_dereference_variable(tmp);
ir_assignment *const then_assign =
- new(ctx) ir_assignment(then_deref, op[1], NULL);
+ new(ctx) ir_assignment(then_deref, op[1]);
stmt->then_instructions.push_tail(then_assign);
else_instructions.move_nodes_to(& stmt->else_instructions);
ir_dereference *const else_deref =
new(ctx) ir_dereference_variable(tmp);
ir_assignment *const else_assign =
- new(ctx) ir_assignment(else_deref, op[2], NULL);
+ new(ctx) ir_assignment(else_deref, op[2]);
stmt->else_instructions.push_tail(else_assign);
result = new(ctx) ir_dereference_variable(tmp);
@@ -3438,9 +3436,7 @@
new(ctx) ir_dereference_variable(is_break_var);
ir_constant *const true_val = new(ctx) ir_constant(true);
ir_assignment *const set_break_var =
- new(ctx) ir_assignment(deref_is_break_var,
- true_val,
- NULL);
+ new(ctx) ir_assignment(deref_is_break_var, true_val);
instructions->push_tail(set_break_var);
}
@@ -3554,8 +3550,7 @@
ir_dereference_variable *deref_is_fallthru_var =
new(ctx) ir_dereference_variable(state->switch_state.is_fallthru_var);
instructions->push_tail(new(ctx) ir_assignment(deref_is_fallthru_var,
- is_fallthru_val,
- NULL));
+ is_fallthru_val));
/* Initalize is_break state to false.
*/
@@ -3568,8 +3563,7 @@
ir_dereference_variable *deref_is_break_var =
new(ctx) ir_dereference_variable(state->switch_state.is_break_var);
instructions->push_tail(new(ctx) ir_assignment(deref_is_break_var,
- is_break_val,
- NULL));
+ is_break_val));
/* Cache test expression.
*/
@@ -3606,8 +3600,7 @@
new(ctx) ir_dereference_variable(state->switch_state.test_var);
instructions->push_tail(state->switch_state.test_var);
- instructions->push_tail(new(ctx) ir_assignment(deref_test_var, test_val,
- NULL));
+ instructions->push_tail(new(ctx) ir_assignment(deref_test_var, test_val));
}
@@ -3755,7 +3748,7 @@
/* Set falltrhu state. */
ir_assignment *set_fallthru =
- new(ctx) ir_assignment(deref_fallthru_var, true_val, NULL);
+ new(ctx) ir_assignment(deref_fallthru_var, true_val);
instructions->push_tail(set_fallthru);
}