anv: call blob_finish when done with it
authorTapani Pälli <tapani.palli@intel.com>
Wed, 6 Mar 2019 10:27:30 +0000 (12:27 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 7 Mar 2019 05:39:48 +0000 (07:39 +0200)
commit4900c0cff4cc1a5966d70402a8ee01b7495d3a0e
treec7b42e428fc4ff3244a586543812aa6bdbe77b21
parenta9555f37d5b15c86aed73d0dab8d514751e12a54
anv: call blob_finish when done with it

Fixes leaks from anv_device_upload_nir:

  ==7345== 8,192 bytes in 2 blocks are definitely lost in loss record 24 of 24
  ==7345==    at 0x4C2ED78: malloc (vg_replace_malloc.c:308)
  ==7345==    by 0x4C31393: realloc (vg_replace_malloc.c:836)
  ==7345==    by 0x54E0848: grow_to_fit (blob.c:67)
  ==7345==    by 0x54E0BE5: blob_reserve_bytes (blob.c:166)
  ==7345==    by 0x54E0C7C: blob_reserve_intptr (blob.c:186)
  ==7345==    by 0x54704A7: nir_serialize (nir_serialize.c:1091)
  ==7345==    by 0x512F97D: anv_device_upload_nir (anv_pipeline_cache.c:756)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/intel/vulkan/anv_pipeline_cache.c