From e1578372827bab216bdc31ea788dd564d206651a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 22 Sep 2014 12:38:24 -0700 Subject: [PATCH] vc4: Switch the context struct to use ralloc. I wanted to hang the ra_regs off it so I didn't have to free, but it turned out it wasn't ralloced yet. --- src/gallium/drivers/vc4/vc4_context.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c index 5133ecadff4..13f0ef0158c 100644 --- a/src/gallium/drivers/vc4/vc4_context.c +++ b/src/gallium/drivers/vc4/vc4_context.c @@ -25,6 +25,7 @@ #include #include "pipe/p_defines.h" +#include "util/ralloc.h" #include "util/u_inlines.h" #include "util/u_memory.h" #include "util/u_blitter.h" @@ -337,7 +338,7 @@ vc4_context_destroy(struct pipe_context *pctx) util_slab_destroy(&vc4->transfer_pool); - free(vc4); + ralloc_free(vc4); } struct pipe_context * @@ -350,7 +351,7 @@ vc4_context_create(struct pipe_screen *pscreen, void *priv) uint32_t saved_shaderdb_flag = vc4_debug & VC4_DEBUG_SHADERDB; vc4_debug &= ~VC4_DEBUG_SHADERDB; - vc4 = CALLOC_STRUCT(vc4_context); + vc4 = rzalloc(NULL, struct vc4_context); if (vc4 == NULL) return NULL; struct pipe_context *pctx = &vc4->base; -- 2.30.2