From: Connor Abbott Date: Thu, 9 Jul 2015 02:01:33 +0000 (-0400) Subject: nir/spirv: fix memory context for builtin variable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8fedc19f5f4cccac827160b7e9ae3068e9982f6;p=mesa.git nir/spirv: fix memory context for builtin variable Fixes valgrind errors with func.depthstencil.basic. --- diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c index 1c25493b551..5401908b15b 100644 --- a/src/glsl/nir/spirv_to_nir.c +++ b/src/glsl/nir/spirv_to_nir.c @@ -801,7 +801,7 @@ get_builtin_variable(struct vtn_builder *b, nir_variable_mode mode; vtn_get_builtin_location(builtin, &var->data.location, &mode); var->data.mode = mode; - var->name = ralloc_strdup(b->shader, "builtin"); + var->name = ralloc_strdup(var, "builtin"); switch (mode) { case nir_var_shader_in: