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:
parent
169a0ae40a
commit
fc782bcbf0
|
@ -983,6 +983,7 @@ nv50_so_target_destroy(struct pipe_context *pipe,
|
||||||
struct nv50_so_target *targ = nv50_so_target(ptarg);
|
struct nv50_so_target *targ = nv50_so_target(ptarg);
|
||||||
if (targ->pq)
|
if (targ->pq)
|
||||||
pipe->destroy_query(pipe, targ->pq);
|
pipe->destroy_query(pipe, targ->pq);
|
||||||
|
pipe_resource_reference(&targ->pipe.buffer, NULL);
|
||||||
FREE(targ);
|
FREE(targ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -899,6 +899,7 @@ nvc0_so_target_destroy(struct pipe_context *pipe,
|
||||||
{
|
{
|
||||||
struct nvc0_so_target *targ = nvc0_so_target(ptarg);
|
struct nvc0_so_target *targ = nvc0_so_target(ptarg);
|
||||||
pipe->destroy_query(pipe, targ->pq);
|
pipe->destroy_query(pipe, targ->pq);
|
||||||
|
pipe_resource_reference(&targ->pipe.buffer, NULL);
|
||||||
FREE(targ);
|
FREE(targ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue