radeonsi: fix fb_too_small condition
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 21 Jun 2021 13:11:27 +0000 (15:11 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 29 Jun 2021 21:38:21 +0000 (23:38 +0200)
commitb72c7c6c5681b38a2c04650c6bc32e12e48d62be
tree44ec1650171baa041cffae2fe23f4c1f27237a8c
parentb564ec776933521263c49028bd266da4160c6a68
radeonsi: fix fb_too_small condition

fb->num_layers can be 0 so use util_num_layers(tex) instead.

Fixes: f7c58559f57 ("radeonsi: refine fast clears for small buffers, always use them for large HTILE")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4764
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11625>
src/gallium/drivers/radeonsi/si_clear.c