[Mesa-dev] [PATCH v2 09/32] glsl_to_nir: Zero nir_variable struct for valgrind & nir_serialize

Kenneth Graunke kenneth at whitecape.org
Thu Oct 19 23:55:20 UTC 2017


On Wednesday, October 18, 2017 10:31:57 PM PDT Jordan Justen wrote:
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
>  src/compiler/glsl/glsl_to_nir.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
> index 63694fd41f..1d1085ffbc 100644
> --- a/src/compiler/glsl/glsl_to_nir.cpp
> +++ b/src/compiler/glsl/glsl_to_nir.cpp
> @@ -311,7 +311,7 @@ nir_visitor::visit(ir_variable *ir)
>     if (ir->data.mode == ir_var_shader_shared)
>        return;
>  
> -   nir_variable *var = ralloc(shader, nir_variable);
> +   nir_variable *var = rzalloc(shader, nir_variable);
>     var->type = ir->type;
>     var->name = ralloc_strdup(var, ir->name);
>  
> 

Patches 9-10:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171019/9d8c7e92/attachment.sig>


More information about the mesa-dev mailing list