[PATCH v2 05/14] etnaviv: take care of the number of layers
Christian Gmeiner
christian.gmeiner at gmail.com
Tue May 1 14:48:34 UTC 2018
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.gmeiner at 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
More information about the etnaviv
mailing list