llvmpipo/nir: free compute shader NIR
authorDave Airlie <airlied@redhat.com>
Tue, 5 May 2020 06:03:34 +0000 (16:03 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 5 May 2020 19:11:19 +0000 (05:11 +1000)
I forgot this in the last round.

Fixes: 18f896e55d96 (llvmpipe: add initial nir support)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4899>

src/gallium/drivers/llvmpipe/lp_state_cs.c

index b57e1068a06554be57fa9c75c1990f8c9cd778dd..ff767a2a86061aa5862cf290b9ab513d21564b7e 100644 (file)
@@ -523,6 +523,8 @@ llvmpipe_delete_compute_state(struct pipe_context *pipe,
       llvmpipe_remove_cs_shader_variant(llvmpipe, li->base);
       li = next;
    }
+   if (shader->base.ir.nir)
+      ralloc_free(shader->base.ir.nir);
    tgsi_free_tokens(shader->base.tokens);
    FREE(shader);
 }