summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_batch.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-08-15 14:27:10 -0400
committerRob Clark <[email protected]>2016-12-01 20:24:46 -0500
commit0b98e84e9ba082b9aa00b24fded3fb56224c6fc6 (patch)
tree8f3800c82abf2e071d2539e5a08d73f6d2bf5ad3 /src/gallium/drivers/freedreno/freedreno_batch.c
parent16f6ceaca9e25f86bcdc509fc0abb48e2d51c3fa (diff)
freedreno: native fence fd support
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_batch.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c
index 369b7e9cda4..646c76fb57d 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch.c
@@ -60,6 +60,8 @@ batch_init(struct fd_batch *batch)
fd_ringbuffer_set_parent(batch->draw, batch->gmem);
fd_ringbuffer_set_parent(batch->binning, batch->gmem);
+ batch->in_fence_fd = -1;
+
batch->cleared = batch->partial_cleared = 0;
batch->restore = batch->resolve = 0;
batch->needs_flush = false;
@@ -109,6 +111,9 @@ batch_fini(struct fd_batch *batch)
{
pipe_resource_reference(&batch->query_buf, NULL);
+ if (batch->in_fence_fd != -1)
+ close(batch->in_fence_fd);
+
fd_ringbuffer_del(batch->draw);
fd_ringbuffer_del(batch->binning);
fd_ringbuffer_del(batch->gmem);