freedreno/ir3: Add ir3_screen_fini()

Move ir3_compiler_destroy() into ir3_screen_fini().  This gives us a
good place to cleanup an sync compile queue.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795>
This commit is contained in:
Rob Clark 2021-01-30 11:12:36 -08:00 committed by Marge Bot
parent 90031adfc7
commit 7100bb1ebc
3 changed files with 12 additions and 2 deletions

View File

@ -61,7 +61,7 @@
#include "common/freedreno_uuid.h"
#include "ir3/ir3_nir.h"
#include "ir3/ir3_compiler.h"
#include "ir3/ir3_gallium.h"
#include "a2xx/ir2.h"
static const struct debug_named_value fd_debug_options[] = {
@ -165,7 +165,7 @@ fd_screen_destroy(struct pipe_screen *pscreen)
u_transfer_helper_destroy(pscreen->transfer_helper);
if (screen->compiler)
ir3_compiler_destroy(screen->compiler);
ir3_screen_fini(pscreen);
ralloc_free(screen->live_batches);

View File

@ -399,3 +399,12 @@ ir3_screen_init(struct pipe_screen *pscreen)
pscreen->finalize_nir = ir3_screen_finalize_nir;
}
void
ir3_screen_fini(struct pipe_screen *pscreen)
{
struct fd_screen *screen = fd_screen(pscreen);
ir3_compiler_destroy(screen->compiler);
screen->compiler = NULL;
}

View File

@ -56,6 +56,7 @@ struct shader_info * ir3_get_shader_info(struct ir3_shader_state *hwcso);
void ir3_prog_init(struct pipe_context *pctx);
void ir3_screen_init(struct pipe_screen *pscreen);
void ir3_screen_fini(struct pipe_screen *pscreen);
/**
* A helper to determine if a fs input 'i' is point/sprite coord, given