[Mesa-dev] [PATCH v2 08/32] nir: Zero nir_load_const_instr::value for valgrind & nir_serialize

Jordan Justen jordan.l.justen at intel.com
Thu Oct 19 05:31:56 UTC 2017


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/compiler/nir/nir.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c
index fe48451694..cbba9c8749 100644
--- a/src/compiler/nir/nir.c
+++ b/src/compiler/nir/nir.c
@@ -481,6 +481,7 @@ 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);
+   memset(&instr->value, 0, sizeof(instr->value));
    instr_init(&instr->instr, nir_instr_type_load_const);
 
    nir_ssa_def_init(&instr->instr, &instr->def, num_components, bit_size, NULL);
-- 
2.15.0.rc0



More information about the mesa-dev mailing list