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.
#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"
util_slab_destroy(&vc4->transfer_pool);
- free(vc4);
+ ralloc_free(vc4);
}
struct pipe_context *
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;