From 9cd4b8b73c1c4995aa16b813dc0c6f1ce458f302 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 3 Jun 2021 12:03:36 -0700 Subject: [PATCH] u_math: Reduce fast-log2 table size from 65k entries back to 256. This was bumped in 7e584a70c492 ("gallium: increase table size for fast log/pow functions") presumably to fix conformance of tgsi_exec, but we don't need that much accuracy in the only place it's used in the tree any more: softpipe texture sampling. softpipe glmark2 -b texture:texture-filter=linear FPS +0.335748% +/- 0.220111% (n=20) Reviewed-by: Erik Faye-Lund Reviewed-by: Adam Jackson Reviewed-by: Alyssa Rosenzweig Part-of: --- src/util/u_math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/u_math.h b/src/util/u_math.h index ec1314ef0a0..becae90714c 100644 --- a/src/util/u_math.h +++ b/src/util/u_math.h @@ -93,7 +93,7 @@ util_get_float32_exponent(float x) } -#define LOG2_TABLE_SIZE_LOG2 16 +#define LOG2_TABLE_SIZE_LOG2 8 #define LOG2_TABLE_SCALE (1 << LOG2_TABLE_SIZE_LOG2) #define LOG2_TABLE_SIZE (LOG2_TABLE_SCALE + 1) extern float log2_table[LOG2_TABLE_SIZE];