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>
This commit is contained in:

committed by
Marge Bot

parent
9d20cf2732
commit
e8cbfa95a3
@@ -2531,6 +2531,9 @@ iris_create_compute_state(struct pipe_context *ctx,
|
||||
iris_create_shader_variant(screen, NULL, IRIS_CACHE_CS,
|
||||
sizeof(key), &key);
|
||||
|
||||
/* Append our new variant to the shader's variant list. */
|
||||
list_addtail(&shader->link, &ish->variants);
|
||||
|
||||
if (!iris_disk_cache_retrieve(screen, uploader, ish, shader,
|
||||
&key, sizeof(key))) {
|
||||
iris_compile_cs(screen, uploader, &ice->dbg, ish, shader);
|
||||
|
Reference in New Issue
Block a user