[Mesa-dev] [PATCH] etnaviv: Do GC3000 resolve-in-place when possible
Wladimir J. van der Laan
laanwj at gmail.com
Sat Sep 30 06:48:29 UTC 2017
On Fri, Sep 29, 2017 at 06:00:13PM +0200, Wladimir J. van der Laan wrote:
> If an RS blit is done with source exactly the same as destination, and
> the hardware supports this, do an in-place resolve.
>
> This is the same as the blob does and potentially saves significant
> bandwidth when doing i.MX6qp scanout using PRE, and when rendering to
> textures (though here using sampler TS would be even better).
>
> Signed-off-by: Wladimir J. van der Laan <laanwj at gmail.com>
> ---
> src/gallium/drivers/etnaviv/etnaviv_emit.c | 9 ++++++++-
> src/gallium/drivers/etnaviv/etnaviv_rs.c | 16 +++++++++++++---
> src/gallium/drivers/etnaviv/etnaviv_rs.h | 1 +
> 3 files changed, 22 insertions(+), 4 deletions(-)
>
> + if (ctx->specs.single_buffer && rs->source == rs->dest &&
> + rs->source_offset == rs->dest_offset &&
> + rs->source_format == rs->dest_format &&
> + rs->source_tiling == rs->dest_tiling &&
> + rs->source_stride == rs->dest_stride &&
> + !rs->downsample_x && !rs->downsample_y &&
> + !rs->swap_rb && !rs->flip &&
> + !rs->clear_mode) {
> + cs->RS_KICKER_INPLACE = (rs->width / 4) * (rs->height / 4);
On second thought this computation is wrong in case of padding, the value we need here is
same as the autodisable tile count:
> surf->surf.padded_width * surf->surf.padded_height / 16
Will send a revised patch asap.
Regards
Wladimir
More information about the mesa-dev
mailing list