mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
unref const buffers during context destroy
This commit is contained in:
parent
1631a9513d
commit
6128c93865
1 changed files with 10 additions and 0 deletions
|
|
@ -51,6 +51,7 @@
|
|||
#include "st_extensions.h"
|
||||
#include "st_program.h"
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_winsys.h"
|
||||
#include "pipe/draw/draw_context.h"
|
||||
#include "pipe/cso_cache/cso_cache.h"
|
||||
|
||||
|
|
@ -136,6 +137,9 @@ struct st_context *st_create_context(struct pipe_context *pipe,
|
|||
|
||||
static void st_destroy_context_priv( struct st_context *st )
|
||||
{
|
||||
struct pipe_winsys *ws = st->pipe->winsys;
|
||||
uint i;
|
||||
|
||||
draw_destroy(st->draw);
|
||||
st_destroy_atoms( st );
|
||||
st_destroy_draw( st );
|
||||
|
|
@ -146,6 +150,12 @@ static void st_destroy_context_priv( struct st_context *st )
|
|||
|
||||
_mesa_delete_program_cache(st->ctx, st->pixel_xfer.cache);
|
||||
|
||||
for (i = 0; i < Elements(st->state.constants); i++) {
|
||||
if (st->state.constants[i].buffer) {
|
||||
ws->buffer_reference(ws, &st->state.constants[i].buffer, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
st->pipe->destroy( st->pipe );
|
||||
free( st );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue