projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee9a3a5
)
ir_algebraic: Use ir_constant::zero.
author
Kenneth Graunke
<kenneth@whitecape.org>
Wed, 28 Jul 2010 19:20:38 +0000
(12:20 -0700)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Wed, 28 Jul 2010 22:46:26 +0000
(15:46 -0700)
src/glsl/ir_algebraic.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/ir_algebraic.cpp
b/src/glsl/ir_algebraic.cpp
index 5b065b086e55c60ab9013eb38aafe49f5dcff0ca..a6ecad7b659823ffd127242c1c229839753376e2 100644
(file)
--- 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;