pan/bi,pan/mdg: Fix memory leak of hash tables

Despite being created with a ralloc context, some memory is still
leaked when not manually destroying hash tables.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>
This commit is contained in:
Icecream95 2021-08-14 23:04:43 +12:00 committed by Marge Bot
parent b85ff56696
commit a9ab168e16
2 changed files with 5 additions and 0 deletions

View File

@ -3624,6 +3624,7 @@ bifrost_compile_shader_nir(nir_shader *nir,
bifrost_nir_lower_store_component,
nir_metadata_block_index |
nir_metadata_dominance, stores);
_mesa_hash_table_u64_destroy(stores);
}
NIR_PASS_V(nir, nir_lower_ssbo);
@ -3764,5 +3765,6 @@ bifrost_compile_shader_nir(nir_shader *nir,
bi_print_stats(ctx, binary->size, stderr);
}
_mesa_hash_table_u64_destroy(ctx->sysval_to_id);
ralloc_free(ctx);
}

View File

@ -3282,5 +3282,8 @@ midgard_compile_shader_nir(nir_shader *nir,
ctx->spills, ctx->fills);
}
_mesa_hash_table_u64_destroy(ctx->ssa_constants);
_mesa_hash_table_u64_destroy(ctx->sysval_to_id);
ralloc_free(ctx);
}