_mesa_delete_memory_object(ctx, obj) == free(obj) but doesn't free the
part of the gallium driver.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1206
Fixes: 49f4ecc6777 "mesa/st: start adding memory object support"
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6148>
st_memoryobj_free(struct gl_context *ctx,
struct gl_memory_object *obj)
{
+ struct st_memory_object *st_obj = st_memory_object(obj);
+ struct st_context *st = st_context(ctx);
+ struct pipe_context *pipe = st->pipe;
+ struct pipe_screen *screen = pipe->screen;
+
+ screen->memobj_destroy(screen, st_obj->memory);
_mesa_delete_memory_object(ctx, obj);
}