diff options
author | Kenneth Graunke <[email protected]> | 2010-07-05 22:33:35 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-07-06 16:03:32 -0700 |
commit | c63a1db81f56cc2021fe1fb2411c327f720b0e09 (patch) | |
tree | 0daf9280508812cc4997574651259f78cd5e32da | |
parent | d1a1ee583e7e8338243b3e9768d2fc5312a1145d (diff) |
ir_constant_expression: Initialize all components of constant data to 0.
This is probably just a good idea, and will come in useful when
implementing things like matrix multiplication.
-rw-r--r-- | src/glsl/ir_constant_expression.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index 548217cddd9..1b81017698e 100644 --- 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]) |