gallium: release textures during context tear-down (fix mem leak)
This commit is contained in:
parent
f8dce51083
commit
87afc9bcad
|
@ -171,6 +171,10 @@ static void st_destroy_context_priv( struct st_context *st )
|
|||
|
||||
_vbo_DestroyContext(st->ctx);
|
||||
|
||||
for (i = 0; i < Elements(st->state.sampler_texture); i++) {
|
||||
pipe_texture_reference(&st->state.sampler_texture[i], NULL);
|
||||
}
|
||||
|
||||
for (i = 0; i < Elements(st->state.constants); i++) {
|
||||
if (st->state.constants[i].buffer) {
|
||||
pipe_reference_buffer(st->pipe, &st->state.constants[i].buffer, NULL);
|
||||
|
|
Loading…
Reference in New Issue