projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1a1ee5
)
ir_constant_expression: Initialize all components of constant data to 0.
author
Kenneth Graunke
<kenneth@whitecape.org>
Tue, 6 Jul 2010 05:33:35 +0000
(22:33 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 6 Jul 2010 23:03:32 +0000
(16:03 -0700)
This is probably just a good idea, and will come in useful when
implementing things like matrix multiplication.
src/glsl/ir_constant_expression.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/ir_constant_expression.cpp
b/src/glsl/ir_constant_expression.cpp
index 548217cddd969ee7c9cc8b8cfaf4053d645bfd27..1b81017698ebdb9571addb499bfcec258dba2495 100644
(file)
--- a/
src/glsl/ir_constant_expression.cpp
+++ b/
src/glsl/ir_constant_expression.cpp
@@
-133,6
+133,8
@@
ir_constant_visitor::visit(ir_expression *ir)
unsigned int operand, c;
ir_constant_data data;
+ memset(&data, 0, sizeof(data));
+
for (operand = 0; operand < ir->get_num_operands(); operand++) {
op[operand] = ir->operands[operand]->constant_expression_value();
if (!op[operand])