aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nouveau_fence.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-09-25 16:34:07 -0400
committerEmil Velikov <[email protected]>2015-10-07 14:44:15 +0100
commitd6ee06e9fe23e6d58701e2ef0d3e059691bf5354 (patch)
tree1dbceddab60862eca7ddf2aa3dd2d821730ae361 /src/gallium/drivers/nouveau/nouveau_fence.c
parent7b8b044ee47a70303a5bcc93c58e61ca71bdcba5 (diff)
nouveau: be more careful about freeing temporary transfer buffers
Deleting a buffer does not flush the command stream. Make sure that we wait for the copies to finish before deleting the temporary bo. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] Tested-by: Marcin Ĺšlusarz <[email protected]> (cherry picked from commit d4e650b07bc80075f0d088e7d85df9efa45e11bd)
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_fence.c')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_fence.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_fence.c b/src/gallium/drivers/nouveau/nouveau_fence.c
index abcdb479954..ee4e08dd520 100644
--- a/src/gallium/drivers/nouveau/nouveau_fence.c
+++ b/src/gallium/drivers/nouveau/nouveau_fence.c
@@ -231,3 +231,11 @@ nouveau_fence_next(struct nouveau_screen *screen)
nouveau_fence_new(screen, &screen->fence.current, false);
}
+
+void
+nouveau_fence_unref_bo(void *data)
+{
+ struct nouveau_bo *bo = data;
+
+ nouveau_bo_ref(NULL, &bo);
+}