Commit c99e9ab2 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

resource_destroy by parts

parent 0ced141b
......@@ -2388,8 +2388,28 @@ static void
panfrost_resource_destroy(struct pipe_screen *screen,
struct pipe_resource *pt)
{
printf("--resource destroy--\n");
/* TODO */
struct panfrost_resource *rsrc = (struct panfrost_resource *) pt;
if (rsrc->tiled) {
/* CPU is all malloc'ed, so just plain ol' free needed */
for (int l = 0; l < (rsrc->base.last_level + 1); ++l) {
free(rsrc->cpu[l]);
}
} else {
/* TODO */
printf("--leaking slab--\n");
}
if (rsrc->has_afbc) {
/* TODO */
printf("--leaking afbc--\n");
}
if (rsrc->has_checksum) {
/* TODO */
printf("--leaking afbc--\n");
}
}
static void *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment