summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-07-28 12:20:38 -0700
committerKenneth Graunke <[email protected]>2010-07-28 15:46:26 -0700
commitf7b94f32a22a769fc71065ca6515186e5a8e3a96 (patch)
tree94e1c95259c1bcaa7d05c1db0ca5d32e7555b840 /src/glsl
parentee9a3a51b61f0afe75b4b8b0c3025310140437ec (diff)
ir_algebraic: Use ir_constant::zero.
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ir_algebraic.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/glsl/ir_algebraic.cpp b/src/glsl/ir_algebraic.cpp
index 5b065b086e5..a6ecad7b659 100644
--- a/src/glsl/ir_algebraic.cpp
+++ b/src/glsl/ir_algebraic.cpp
@@ -213,13 +213,9 @@ ir_algebraic_visitor::handle_expression(ir_rvalue *in_ir)
return ir->operands[0];
}
- if (is_vec_zero(op_const[0]) ||
- is_vec_zero(op_const[1])) {
- ir_constant_data zero_data;
- memset(&zero_data, 0, sizeof(zero_data));
-
+ if (is_vec_zero(op_const[0]) || is_vec_zero(op_const[1])) {
this->progress = true;
- return new(ir) ir_constant(ir->type, &zero_data);
+ return ir_constant::zero(ir, ir->type);
}
break;