iris: Fix compute shader leak
authorMykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Tue, 31 Aug 2021 07:43:46 +0000 (10:43 +0300)
committerMarge Bot <eric+marge@anholt.net>
Wed, 1 Sep 2021 10:02:38 +0000 (10:02 +0000)
commite8cbfa95a3a1d7ca1db235ae03fd76a698d5a556
tree06f59f9129335653b34a6d1bd4cc6e3da9f2189f
parent9d20cf27326a2ed948182de75dc2c865ff0e7544
iris: Fix compute shader leak

Variant after creation with the function iris_create_shader_variant
requires to be added to variants. Otherwise there is a memory
leak after execution.

Fixes: 2024d470483("iris: Add the variant to the list as early as possible")
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12645>
src/gallium/drivers/iris/iris_program.c