summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.cpp
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-08-29 13:15:56 -0700
committerVinson Lee <[email protected]>2010-08-29 13:15:56 -0700
commit30a086552827b82738421ff2d562e3c8c1da2735 (patch)
treea0a33dca7aaa0abdd4503e549307e0c55490dd8c /src/glsl/ir.cpp
parent2d0ef6bfee64b6889cbfb69762f167a6dfc20131 (diff)
glsl: Completely initialize value member in ir_constant constructor.
The ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list) did not completely initialize the entire value member. Fixes piglit glsl-fs-sampler-numbering-2 valgrind uninitialized value error in softpipe and llvmpipe.
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r--src/glsl/ir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index d56b6031164..992853c0466 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -409,6 +409,9 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
return;
}
+ for (unsigned i = 0; i < 16; i++) {
+ this->value.u[i] = 0;
+ }
ir_constant *value = (ir_constant *) (value_list->head);