gallium: drop large fast math tables

no need for these in virgl
macos/master
Dave Airlie 10 years ago
parent 55d226385b
commit 51d84f851c
  1. 8
      src/gallium/auxiliary/util/u_math.c
  2. 4
      src/gallium/auxiliary/util/u_math.h

@ -38,7 +38,7 @@
#define _MM_DENORMALS_ZERO_MASK 0x0040
#endif
#if 0
/** 2^x, for x in [-1.0, 1.0) */
float pow2_table[POW2_TABLE_SIZE];
@ -63,7 +63,7 @@ init_log2_table(void)
for (i = 0; i < LOG2_TABLE_SIZE; i++)
log2_table[i] = (float) log2(1.0 + i * (1.0 / LOG2_TABLE_SCALE));
}
#endif
/**
* One time init for math utilities.
@ -73,8 +73,8 @@ util_init_math(void)
{
static boolean initialized = FALSE;
if (!initialized) {
init_pow2_table();
init_log2_table();
// init_pow2_table();
/* init_log2_table();*/
initialized = TRUE;
}
}

@ -293,6 +293,8 @@ util_fast_exp(float x)
}
#if 0
#define LOG2_TABLE_SIZE_LOG2 16
#define LOG2_TABLE_SCALE (1 << LOG2_TABLE_SIZE_LOG2)
#define LOG2_TABLE_SIZE (LOG2_TABLE_SCALE + 1)
@ -323,7 +325,7 @@ util_fast_pow(float x, float y)
{
return util_fast_exp2(util_fast_log2(x) * y);
}
#endif
/* Note that this counts zero as a power of two.
*/
static INLINE boolean

Loading…
Cancel
Save