Mesa (master): panfrost: Fix stack shift calculation
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 13 21:00:10 UTC 2020
Module: Mesa
Branch: master
Commit: 12dec2004ed0b50b0cb0ad7cc635f2a706be9891
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=12dec2004ed0b50b0cb0ad7cc635f2a706be9891
Author: Icecream95 <ixn at disroot.org>
Date: Sat Nov 14 00:12:26 2020 +1300
panfrost: Fix stack shift calculation
Fixes flickering in Neverwinter Nights.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3789
Fixes: e6152091ca9 ("panfrost: Use canonical characterization of tls_size")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7613>
---
src/panfrost/lib/pan_scratch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/panfrost/lib/pan_scratch.c b/src/panfrost/lib/pan_scratch.c
index c632440fa5b..2742acb90e2 100644
--- a/src/panfrost/lib/pan_scratch.c
+++ b/src/panfrost/lib/pan_scratch.c
@@ -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;
}
More information about the mesa-commit
mailing list