glsl: Initialize data in read_constant.
authorVinson Lee <vlee@vmware.com>
Sun, 29 Aug 2010 18:48:02 +0000 (11:48 -0700)
committerVinson Lee <vlee@vmware.com>
Sun, 29 Aug 2010 18:48:02 +0000 (11:48 -0700)
Completely initialize data that is passed into a ir_constant constructor.

Fixes piglit glsl-fs-mix valgrind uninitialized variable error on
softpipe and llvmpipe.

src/glsl/ir_reader.cpp

index 366db3277405cfb432a9f0e3351542d5eea944c4..e57e03c3078c0b50c3e1a4ae50cd1cce69fc89e0 100644 (file)
@@ -803,7 +803,7 @@ read_constant(_mesa_glsl_parse_state *st, s_list *list)
 
    const glsl_type *const base_type = type->get_base_type();
 
-   ir_constant_data data;
+   ir_constant_data data = { { 0 } };
 
    // Read in list of values (at most 16).
    int k = 0;