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:
parent
b85ff56696
commit
a9ab168e16
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue