From 12dec2004ed0b50b0cb0ad7cc635f2a706be9891 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Sat, 14 Nov 2020 00:12:26 +1300 Subject: [PATCH] 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 Part-of: --- 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; }