aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2020-06-04 12:55:41 -0700
committerRob Clark <[email protected]>2020-06-26 08:43:23 -0700
commitc0f22c3d9406ef354142e974783f6c6c066a5c68 (patch)
tree895780f93db924d8fa430b863273fe86d92c423c /src/gallium
parentf1ab57359c7a98ecd45ba3da905dd44c4d7cae5b (diff)
freedreno/ir3: add ir3_compiler_destroy()
Use ir3_compiler_destroy() rather than open-coding ralloc_free(). This will give us a place to add more compiler related cleanup code in the following patches. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 657f693a1f8..1be5feb2e8f 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -59,6 +59,7 @@
#include "ir3/ir3_nir.h"
+#include "ir3/ir3_compiler.h"
#include "a2xx/ir2.h"
static const struct debug_named_value debug_options[] = {
@@ -159,7 +160,9 @@ fd_screen_destroy(struct pipe_screen *pscreen)
simple_mtx_destroy(&screen->lock);
- ralloc_free(screen->compiler);
+ if (screen->compiler)
+ ir3_compiler_destroy(screen->compiler);
+
ralloc_free(screen->live_batches);
free(screen->perfcntr_queries);