From b8fedc19f5f4cccac827160b7e9ae3068e9982f6 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Wed, 8 Jul 2015 22:01:33 -0400 Subject: [PATCH] nir/spirv: fix memory context for builtin variable Fixes valgrind errors with func.depthstencil.basic. --- src/glsl/nir/spirv_to_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.30.2