mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
mesa/st: Actually free the driver part of memory objects on destruction.
_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:49f4ecc677"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> (cherry picked from commit99cf910834)
This commit is contained in:
parent
4fb918f456
commit
440275b3e2
2 changed files with 7 additions and 1 deletions
|
|
@ -931,7 +931,7 @@
|
|||
"description": "mesa/st: Actually free the driver part of memory objects on destruction.",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "49f4ecc67773c082d93708bdf111acc4248678da"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue