summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_transfer.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_transfer.c b/src/gallium/drivers/etnaviv/etnaviv_transfer.c
index 45cd31207f7..d875803bde2 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_transfer.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_transfer.c
@@ -360,8 +360,14 @@ etna_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc,
if ((trans->rsc && (etna_resource(trans->rsc)->status & ETNA_PENDING_WRITE)) ||
(!trans->rsc &&
(((usage & PIPE_TRANSFER_READ) && (rsc->status & ETNA_PENDING_WRITE)) ||
- ((usage & PIPE_TRANSFER_WRITE) && rsc->status))))
- pctx->flush(pctx, NULL, 0);
+ ((usage & PIPE_TRANSFER_WRITE) && rsc->status)))) {
+ set_foreach(rsc->pending_ctx, entry) {
+ struct etna_context *pend_ctx = (struct etna_context *)entry->key;
+ struct pipe_context *pend_pctx = &pend_ctx->base;
+
+ pend_pctx->flush(pend_pctx, NULL, 0);
+ }
+ }
mtx_unlock(&screen->lock);