The ssa_constants hash table and its elements are leaked. Pass the
context to the allocator to avoid that.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10408>
{
nir_ssa_def def = instr->def;
- midgard_constants *consts = rzalloc(NULL, midgard_constants);
+ midgard_constants *consts = rzalloc(ctx, midgard_constants);
assert(instr->def.num_components * instr->def.bit_size <= sizeof(*consts) * 8);
/* Initialize at a global (not block) level hash tables */
- ctx->ssa_constants = _mesa_hash_table_u64_create(NULL);
+ ctx->ssa_constants = _mesa_hash_table_u64_create(ctx);
/* Lower gl_Position pre-optimisation, but after lowering vars to ssa
* (so we don't accidentally duplicate the epilogue since mesa/st has