mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
anv: fix leak of custom border colors
Inside a HAVE_VALGRIND section. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes:4dad2a4a6f("anv: enable shader border color capture/replay") Reviewed-by: Rohan Garg <rohan.garg@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29057> (cherry picked from commitae6d20815a)
This commit is contained in:
parent
ec0e288fa7
commit
27cf49205c
2 changed files with 4 additions and 2 deletions
|
|
@ -164,7 +164,7 @@
|
|||
"description": "anv: fix leak of custom border colors",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "4dad2a4a6fd76d8bc889d655c812a6f0ba757ed7",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -4032,6 +4032,9 @@ void anv_DestroyDevice(
|
|||
device->companion_rcs_cmd_pool, NULL);
|
||||
}
|
||||
|
||||
if (device->vk.enabled_extensions.EXT_descriptor_buffer)
|
||||
anv_state_reserved_array_pool_finish(&device->custom_border_colors_db);
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
/* We only need to free these to prevent valgrind errors. The backing
|
||||
* BO will go away in a couple of lines so we don't actually leak.
|
||||
|
|
@ -4045,7 +4048,6 @@ void anv_DestroyDevice(
|
|||
anv_state_pool_free(&device->dynamic_state_db_pool, device->cps_states_db);
|
||||
anv_state_pool_free(&device->dynamic_state_db_pool, device->slice_hash_db);
|
||||
anv_state_pool_free(&device->dynamic_state_db_pool, device->border_colors_db);
|
||||
anv_state_reserved_array_pool_finish(&device->custom_border_colors_db);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue