From 986e467e4c5c9610a01b0176c02c2310ed019ae8 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 11 Dec 2017 19:27:39 +0100 Subject: gallium/util: add util_num_layers helper --- src/gallium/drivers/radeonsi/si_clear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers/radeonsi/si_clear.c') diff --git a/src/gallium/drivers/radeonsi/si_clear.c b/src/gallium/drivers/radeonsi/si_clear.c index ba95ed51f14..0ac83f446bf 100644 --- a/src/gallium/drivers/radeonsi/si_clear.c +++ b/src/gallium/drivers/radeonsi/si_clear.c @@ -214,7 +214,7 @@ void vi_dcc_clear_level(struct si_context *sctx, assert(rtex->resource.b.b.nr_samples <= 1); clear_size = rtex->surface.dcc_size; } else { - unsigned num_layers = util_max_layer(&rtex->resource.b.b, level) + 1; + unsigned num_layers = util_num_layers(&rtex->resource.b.b, level); /* If this is 0, fast clear isn't possible. (can occur with MSAA) */ assert(rtex->surface.u.legacy.level[level].dcc_fast_clear_size); -- cgit v1.2.3