mesa/st: Actually free the driver part of memory objects on destruction.
[mesa.git] / src / mesa / state_tracker / st_cb_memoryobjects.c
index b193eb37cb2f9e82aef7a6e37f5f2efa48768770..3ef316a45f872eb6131e4c95f60c26068baf230c 100644 (file)
@@ -54,6 +54,12 @@ static void
 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);
 }