diff options
author | Eric Anholt <[email protected]> | 2014-09-22 12:38:24 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-09-23 13:40:10 -0700 |
commit | e1578372827bab216bdc31ea788dd564d206651a (patch) | |
tree | e87b34c1ab1375716ae6e5a5d0ed07408591c69b | |
parent | 517e01b5c3db9ba750698096e823134b288e213f (diff) |
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.
-rw-r--r-- | src/gallium/drivers/vc4/vc4_context.c | 5 |
1 files 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 <err.h> #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; |