zink: pass mem_ctx to ralloc_size-call
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 17 Jul 2020 17:03:05 +0000 (19:03 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 17 Jul 2020 17:33:35 +0000 (17:33 +0000)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5954>

src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c

index 11145ed4257d0bd1e7abb1c4175ad3f4b95f10e2..2f55585b415b54c480f51b3c3ac62f11bc857ab0 100644 (file)
@@ -917,7 +917,7 @@ emit_so_info(struct ntv_context *ctx, unsigned max_output_location,
       if (so_output.start_component)
          spirv_builder_emit_component(&ctx->builder, var_id, so_output.start_component);
 
-      uint32_t *key = ralloc_size(NULL, sizeof(uint32_t));
+      uint32_t *key = ralloc_size(ctx->mem_ctx, sizeof(uint32_t));
       *key = (uint32_t)so_output.register_index << 2 | so_output.start_component;
       _mesa_hash_table_insert(ctx->so_outputs, key, (void *)(intptr_t)var_id);