nir/spirv: fix memory context for builtin variable
authorConnor Abbott <connor.w.abbott@intel.com>
Thu, 9 Jul 2015 02:01:33 +0000 (22:01 -0400)
committerConnor Abbott <connor.w.abbott@intel.com>
Thu, 9 Jul 2015 02:03:30 +0000 (22:03 -0400)
Fixes valgrind errors with func.depthstencil.basic.

src/glsl/nir/spirv_to_nir.c

index 1c25493b551581a6da8277de61cc9c4d0ec0ac5d..5401908b15b8a6fb4bf73a2ef133f0009edc2deb 100644 (file)
@@ -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: