mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 11:00:27 +01:00
etnaviv: don't read back resource if transfer discards contents
Reduces bandwidth usage of transfers which discard the buffer contents, as well as skipping unnecessary command stream flushes and CPU/GPU synchronization. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
This commit is contained in:
parent
c3b2c7a75f
commit
6e628ee3f3
1 changed files with 3 additions and 1 deletions
|
|
@ -197,7 +197,9 @@ etna_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
etna_copy_resource(pctx, trans->rsc, prsc, level, trans->rsc->last_level);
|
||||
if (!(usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE))
|
||||
etna_copy_resource(pctx, trans->rsc, prsc, level,
|
||||
trans->rsc->last_level);
|
||||
|
||||
/* Switch to using the temporary resource instead */
|
||||
rsc = etna_resource(trans->rsc);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue