With the help of the number of layers we can choose the correct RS clear format - like the binary blob does.
Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com> --- src/gallium/drivers/etnaviv/etnaviv_rs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_rs.c b/src/gallium/drivers/etnaviv/etnaviv_rs.c index 3febd8daef..fbcdb4f57d 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_rs.c +++ b/src/gallium/drivers/etnaviv/etnaviv_rs.c @@ -254,9 +254,10 @@ 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); + const int layer = translate_rs_layer(surf->base.format); uint32_t format; - switch (util_format_get_blocksize(surf->base.format)) { + switch (util_format_get_blocksize(surf->base.format) / layer) { case 2: format = RS_FORMAT_A4R4G4B4; break; -- 2.17.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev