panfrost: Free cloned NIR shader
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 18 Aug 2020 12:07:15 +0000 (08:07 -0400)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 20 Aug 2020 16:15:01 +0000 (18:15 +0200)
commit9146f596ed1e8854a2a6c9137396a902bc92946c
tree4ce73290894fc9150726824d81978c92d0060b2d
parentba4fc67812cd052a4c89cac0f376326f52da1fda
panfrost: Free cloned NIR shader

Fixes heaptrack leak:

19.37KB leaked over 63 calls from:
    0xffff92bbefc3
      in ??
    nir_alu_instr_create
      at ../src/compiler/nir/nir.c:442
      in /home/alyssa/rockchip_dri.so
    clone_alu
      at ../src/compiler/nir/nir_clone.c:277
      in /home/alyssa/rockchip_dri.so
    clone_instr
      at ../src/compiler/nir/nir_clone.c:495
      in /home/alyssa/rockchip_dri.so
    clone_block
      at ../src/compiler/nir/nir_clone.c:544
    clone_cf_list
      at ../src/compiler/nir/nir_clone.c:594
    clone_function_impl
      at ../src/compiler/nir/nir_clone.c:672
      in /home/alyssa/rockchip_dri.so
    nir_shader_clone
      at ../src/compiler/nir/nir_clone.c:744
      in /home/alyssa/rockchip_dri.so
    panfrost_shader_compile
      at ../src/gallium/drivers/panfrost/pan_assemble.c:154
      in /home/alyssa/rockchip_dri.so

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
src/gallium/drivers/panfrost/pan_assemble.c