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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user