diff options
author | Jason Ekstrand <[email protected]> | 2015-06-09 11:41:31 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-06-09 12:36:23 -0700 |
commit | 38f5eef59de0be41c4c5bd77fb221c75981e1e5c (patch) | |
tree | 99bf63be4a5ee366243afce79dee6f788a0dc4b9 /src | |
parent | 999b56c507fa9542725556aa9409d029fdc19c94 (diff) |
vk/device: Free border color states when we have valgrind
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/device.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 843c1ed61f0..37449d7ae4f 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -412,6 +412,16 @@ VkResult anv_DestroyDevice( anv_device_finish_meta(device); +#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. + */ + anv_state_pool_free(&device->dynamic_state_pool, + device->float_border_colors); + anv_state_pool_free(&device->dynamic_state_pool, + device->uint32_border_colors); +#endif + anv_bo_pool_finish(&device->batch_bo_pool); anv_block_pool_finish(&device->dynamic_state_block_pool); anv_block_pool_finish(&device->instruction_block_pool); |