panfrost: Fix stack shift calculation

Fixes flickering in Neverwinter Nights.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3789
Fixes: e6152091ca ("panfrost: Use canonical characterization of tls_size")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7613>
This commit is contained in:
Icecream95 2020-11-14 00:12:26 +13:00 committed by Marge Bot
parent 24c553c975
commit 12dec2004e
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ unsigned
panfrost_get_stack_shift(unsigned stack_size)
{
if (stack_size)
return util_logbase2(DIV_ROUND_UP(stack_size, 16));
return util_logbase2_ceil(DIV_ROUND_UP(stack_size, 16));
else
return 0;
}