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:
parent
24c553c975
commit
12dec2004e
|
@ -67,7 +67,7 @@ unsigned
|
||||||
panfrost_get_stack_shift(unsigned stack_size)
|
panfrost_get_stack_shift(unsigned stack_size)
|
||||||
{
|
{
|
||||||
if (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
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue