summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_resource.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-11-19 10:36:19 -0500
committerRob Clark <[email protected]>2017-12-03 14:17:40 -0500
commit15ebf387fc43632be0e68365cf92ac8fb1b64a9c (patch)
treec38457eb447df994c138d01a155122406accda3c /src/gallium/drivers/freedreno/freedreno_resource.c
parentdeb57fb237c3be9629a39ef1978dfac4563d6bda (diff)
freedreno: rework fence tracking
ctx->last_fence isn't such a terribly clever idea, if batches can be flushed out of order. Instead, each batch now holds a fence, which is created before the batch is flushed (useful for next patch), that later gets populated after the batch is actually flushed. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_resource.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index e305b5f9eb8..54b66c0940c 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -546,7 +546,7 @@ fd_resource_transfer_map(struct pipe_context *pctx,
mtx_unlock(&ctx->screen->lock);
foreach_batch(batch, &ctx->screen->batch_cache, batch_mask)
- fd_batch_flush(batch, false);
+ fd_batch_flush(batch, false, false);
foreach_batch(batch, &ctx->screen->batch_cache, batch_mask) {
fd_batch_sync(batch);
@@ -554,7 +554,7 @@ fd_resource_transfer_map(struct pipe_context *pctx,
}
assert(rsc->batch_mask == 0);
} else {
- fd_batch_flush(write_batch, true);
+ fd_batch_flush(write_batch, true, false);
}
assert(!rsc->write_batch);
}
@@ -1166,7 +1166,7 @@ fd_flush_resource(struct pipe_context *pctx, struct pipe_resource *prsc)
struct fd_resource *rsc = fd_resource(prsc);
if (rsc->write_batch)
- fd_batch_flush(rsc->write_batch, true);
+ fd_batch_flush(rsc->write_batch, true, false);
assert(!rsc->write_batch);
}