[Mesa-dev] [PATCH] etnaviv: rs: choose clear format based on block size
Lucas Stach
l.stach at pengutronix.de
Mon May 27 08:38:29 UTC 2019
Am Sonntag, den 26.05.2019, 21:06 +0200 schrieb Christian Gmeiner:
> Fixes following piglit and does not introduce any regressions.
> spec at ext_packed_depth_stencil@fbo-depth-gl_depth24_stencil8-blit
>
> Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Lucas Stach <l.stach at pengutronix.de>
> ---
> src/gallium/drivers/etnaviv/etnaviv_rs.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_rs.c b/src/gallium/drivers/etnaviv/etnaviv_rs.c
> index e64babfdd0a..8c85f329f76 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_rs.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_rs.c
> @@ -254,7 +254,19 @@ etna_rs_gen_clear_surface(struct etna_context *ctx, struct etna_surface *surf,
> uint32_t clear_value)
> {
> struct etna_resource *dst = etna_resource(surf->base.texture);
> - uint32_t format = translate_rs_format(surf->base.format);
> + uint32_t format;
> +
> + switch (util_format_get_blocksizebits(surf->base.format)) {
> + case 16:
> + format = RS_FORMAT_A4R4G4B4;
> + break;
> + case 32:
> + format = RS_FORMAT_A8R8G8B8;
> + break;
> + default:
> + format = ETNA_NO_MATCH;
> + break;
> + }
>
> if (format == ETNA_NO_MATCH) {
> BUG("etna_rs_gen_clear_surface: Unhandled clear fmt %s", util_format_name(surf->base.format));
More information about the mesa-dev
mailing list