diff options
author | Luca Barbieri <[email protected]> | 2010-04-02 00:34:44 +0200 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-04-02 00:47:11 +0200 |
commit | 7bb54c99a466883af3ac3e79426def17dcfa8d89 (patch) | |
tree | 385a6e349e8b21683b97a98cec62107a0f1b98e3 /src/gallium/auxiliary/util/u_half.h | |
parent | e40fce13e152ecf929c899ed38a8e5f7d198c738 (diff) |
Revert "util: Init half-float tables on demand."
This reverts commit 950300eb255f0e3507bf2757d16c3b5bc8ff3471.
Diffstat (limited to 'src/gallium/auxiliary/util/u_half.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_half.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/util/u_half.h b/src/gallium/auxiliary/util/u_half.h index 50948cadf59..5afdd925a62 100644 --- a/src/gallium/auxiliary/util/u_half.h +++ b/src/gallium/auxiliary/util/u_half.h @@ -8,14 +8,13 @@ extern "C" { #endif + extern uint32_t util_half_to_float_mantissa_table[2048]; extern uint32_t util_half_to_float_exponent_table[64]; extern uint32_t util_half_to_float_offset_table[64]; extern uint16_t util_float_to_half_base_table[512]; extern uint8_t util_float_to_half_shift_table[512]; -void util_half_init_tables(void); - /* * Note that if the half float is a signaling NaN, the x87 FPU will turn * it into a quiet NaN immediately upon loading into a float. @@ -31,7 +30,6 @@ static INLINE uint32_t util_half_to_floatui(half h) { unsigned exp = h >> 10; - util_half_init_tables(); return util_half_to_float_mantissa_table[util_half_to_float_offset_table[exp] + (h & 0x3ff)] + util_half_to_float_exponent_table[exp]; } @@ -40,7 +38,6 @@ static INLINE float util_half_to_float(half h) { union fi r; - util_half_init_tables(); r.ui = util_half_to_floatui(h); return r.f; } @@ -49,7 +46,6 @@ static INLINE half util_floatui_to_half(uint32_t v) { unsigned signexp = v >> 23; - util_half_init_tables(); return util_float_to_half_base_table[signexp] + ((v & 0x007fffff) >> util_float_to_half_shift_table[signexp]); } @@ -58,7 +54,6 @@ static INLINE half util_float_to_half(float f) { union fi i; - util_half_init_tables(); i.f = f; return util_floatui_to_half(i.ui); } |