mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
unref const buffers during context destroy
This commit is contained in:
parent
6128c93865
commit
4fabee9d4d
1 changed files with 7 additions and 0 deletions
|
|
@ -127,6 +127,7 @@ softpipe_unmap_surfaces(struct softpipe_context *sp)
|
|||
static void softpipe_destroy( struct pipe_context *pipe )
|
||||
{
|
||||
struct softpipe_context *softpipe = softpipe_context( pipe );
|
||||
struct pipe_winsys *ws = pipe->winsys;
|
||||
uint i;
|
||||
|
||||
draw_destroy( softpipe->draw );
|
||||
|
|
@ -152,6 +153,12 @@ static void softpipe_destroy( struct pipe_context *pipe )
|
|||
for (i = 0; i < PIPE_MAX_SAMPLERS; i++)
|
||||
sp_destroy_tile_cache(softpipe->tex_cache[i]);
|
||||
|
||||
for (i = 0; i < Elements(softpipe->constants); i++) {
|
||||
if (softpipe->constants[i].buffer) {
|
||||
ws->buffer_reference(ws, &softpipe->constants[i].buffer, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
FREE( softpipe );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue