From 30a086552827b82738421ff2d562e3c8c1da2735 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 29 Aug 2010 13:15:56 -0700 Subject: [PATCH] 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. --- src/glsl/ir.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.30.2