From: Jordan Justen Date: Mon, 2 Oct 2017 07:19:31 +0000 (-0700) Subject: glsl_to_nir: Zero nir_constant in constant_copy for valgrind & nir_serialize X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87e71726e0c44871778c3e1428dc81649cd9f292;p=mesa.git glsl_to_nir: Zero nir_constant in constant_copy for valgrind & nir_serialize Signed-off-by: Jordan Justen Reviewed-by: Timothy Arceri Reviewed-by: Kenneth Graunke Reviewed-by: Jason Ekstrand --- diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 1d1085ffbcf..c659a25ca77 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -219,7 +219,7 @@ constant_copy(ir_constant *ir, void *mem_ctx) if (ir == NULL) return NULL; - nir_constant *ret = ralloc(mem_ctx, nir_constant); + nir_constant *ret = rzalloc(mem_ctx, nir_constant); const unsigned rows = ir->type->vector_elements; const unsigned cols = ir->type->matrix_columns;