nv50,nvc0: fix stream output target buffer leak

It manifests at exit as:
"WARNING: destroying GPU memory cache with some buffers still in use"
This commit is contained in:
Marcin Slusarz 2012-06-14 21:48:46 +02:00
parent 169a0ae40a
commit fc782bcbf0
2 changed files with 2 additions and 0 deletions

View File

@ -983,6 +983,7 @@ nv50_so_target_destroy(struct pipe_context *pipe,
struct nv50_so_target *targ = nv50_so_target(ptarg);
if (targ->pq)
pipe->destroy_query(pipe, targ->pq);
pipe_resource_reference(&targ->pipe.buffer, NULL);
FREE(targ);
}

View File

@ -899,6 +899,7 @@ nvc0_so_target_destroy(struct pipe_context *pipe,
{
struct nvc0_so_target *targ = nvc0_so_target(ptarg);
pipe->destroy_query(pipe, targ->pq);
pipe_resource_reference(&targ->pipe.buffer, NULL);
FREE(targ);
}