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>
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);