diff options
author | Lucas Stach <[email protected]> | 2017-05-18 15:37:02 +0200 |
---|---|---|
committer | Lucas Stach <[email protected]> | 2017-06-08 18:29:36 +0200 |
commit | a276c32a08bd41ceb8fd9b604ba9ac8229d59b64 (patch) | |
tree | 4f1e760ec0ea7dea28b904305ba0670dd80dadd5 /src/gallium/drivers/etnaviv/etnaviv_transfer.c | |
parent | ada3c3aa3da5d04bd597014dc1b5d4b028313513 (diff) |
etnaviv: slim down resource waiting
cpu_prep() already does all the required waiting, so the only thing that
needs to be done is flushing the commandstream, if a GPU write is pending.
Signed-off-by: Lucas Stach <[email protected]>
Reviewed-by: Wladimir J. van der Laan <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_transfer.c')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_transfer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_transfer.c b/src/gallium/drivers/etnaviv/etnaviv_transfer.c index 4809b04ff95..269bd498f89 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_transfer.c +++ b/src/gallium/drivers/etnaviv/etnaviv_transfer.c @@ -199,8 +199,9 @@ etna_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc, /* Always sync if we have the temporary resource. The PIPE_TRANSFER_READ * case could be optimised if we knew whether the resource has outstanding * rendering. */ - if (usage & PIPE_TRANSFER_READ || trans->rsc) - etna_resource_wait(pctx, rsc); + if ((usage & PIPE_TRANSFER_READ || trans->rsc) && + rsc->status & ETNA_PENDING_WRITE) + pctx->flush(pctx, NULL, 0); /* XXX we don't handle PIPE_TRANSFER_FLUSH_EXPLICIT; this flag can be ignored * when mapping in-place, |