zink: free local shader nirs on program free

leak--

Fixes: 61f2667cf5 ("zink: remove gfx program slot mapping")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12630>
(cherry picked from commit 441018a173)
This commit is contained in:
Mike Blumenkrantz 2021-08-30 11:30:46 -04:00 committed by Dylan Baker
parent 29e51b6eb0
commit 179a291826
2 changed files with 2 additions and 1 deletions

View file

@ -112,7 +112,7 @@
"description": "zink: free local shader nirs on program free",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "61f2667cf5da6fd1a6d957761c8e244c1bc0da35"
},

View file

@ -681,6 +681,7 @@ zink_destroy_gfx_program(struct zink_screen *screen,
prog->shaders[i] = NULL;
destroy_shader_cache(screen, &prog->base.shader_cache[i]);
}
ralloc_free(prog->nir[i]);
}
for (int i = 0; i < ARRAY_SIZE(prog->pipelines); ++i) {