llvmpipe/nir: free the nir shader
authorDave Airlie <airlied@redhat.com>
Wed, 15 Apr 2020 00:45:47 +0000 (10:45 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 15 Apr 2020 20:25:46 +0000 (06:25 +1000)
Fixes: 18f896e55d96 (llvmpipe: add initial nir support)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4563>

src/gallium/drivers/llvmpipe/lp_state_fs.c

index cb16278..f55cfa9 100644 (file)
@@ -3138,6 +3138,8 @@ llvmpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
    /* Delete draw module's data */
    draw_delete_fragment_shader(llvmpipe->draw, shader->draw_data);
 
+   if (shader->base.ir.nir)
+      ralloc_free(shader->base.ir.nir);
    assert(shader->variants_cached == 0);
    FREE((void *) shader->base.tokens);
    FREE(shader);