nir: Zero nir_load_const_instr::value for valgrind & nir_serialize
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 2 Oct 2017 07:14:51 +0000 (00:14 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Wed, 25 Oct 2017 19:36:21 +0000 (12:36 -0700)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir.c

index fe484516947f2a819a2d40319f7e95007d28e5fe..7380bf436a83a4f3d762f0e4a9755ce7fb10d9c7 100644 (file)
@@ -480,7 +480,7 @@ nir_load_const_instr *
 nir_load_const_instr_create(nir_shader *shader, unsigned num_components,
                             unsigned bit_size)
 {
-   nir_load_const_instr *instr = ralloc(shader, nir_load_const_instr);
+   nir_load_const_instr *instr = rzalloc(shader, nir_load_const_instr);
    instr_init(&instr->instr, nir_instr_type_load_const);
 
    nir_ssa_def_init(&instr->instr, &instr->def, num_components, bit_size, NULL);