diff options
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_math.h')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_math.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_math.h b/mesalib/src/gallium/auxiliary/util/u_math.h index f6dcb228f..2823e0570 100644 --- a/mesalib/src/gallium/auxiliary/util/u_math.h +++ b/mesalib/src/gallium/auxiliary/util/u_math.h @@ -616,6 +616,14 @@ fui( float f ) return fi.ui; } +static INLINE float +uif(uint32_t ui) +{ + union fi fi; + fi.ui = ui; + return fi.f; +} + /** * Convert ubyte to float in [0, 1]. @@ -817,7 +825,7 @@ util_memcpy_cpu_to_le32(void * restrict dest, const void * restrict src, size_t { #ifdef PIPE_ARCH_BIG_ENDIAN size_t i, e; - asset(n % 4 == 0); + assert(n % 4 == 0); for (i = 0, e = n / 4; i < e; i++) { uint32_t * restrict d = (uint32_t* restrict)dest; |