summaryrefslogtreecommitdiffstats
path: root/src/util/u_math.h
Commit message (Collapse)AuthorAgeFilesLines
* util: include u_endian.h in u_math.hRhys Perry2019-09-061-0/+1
| | | | | | | | | | | | u_endian.h needs to be included, otherwise PIPE_ARCH_BIG_ENDIAN might not be defined on big-endian architectures and the endian conversion macros will be incorrect. I don't think anything is broken because of this, I just noticed this when looking at the file. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: move bitcount to bitscan.hKevin Strasser2019-08-211-36/+0
| | | | | | | | | bitcount is free from the pipe header dependencies that make u_math.h hard to include by non-gallium specific code, so move it to bitscan.h. bitscan.h is included by u_math.h so existing references will continue working. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* util: u_math: drop p_compiler.h includeLionel Landwerlin2019-08-091-23/+21
| | | | | | | This file was moved from gallium so drop depending on gallium headers. Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* u_math: add ushort_to_float/float_to_ushortQiang Yu2019-04-111-0/+31
| | | | | | | | v2: - return 0 for NaN too Signed-off-by: Qiang Yu <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* move u_math to src/utilDylan Baker2018-09-071-0/+752
Currently we have two sets of functions for bit counts, one in gallium and one in core mesa. The ones in core mesa are header only in many cases, since they reduce to "#define _mesa_bitcount popcount", but they provide a fallback implementation. This is important because 32bit msvc doesn't have popcountll, just popcount; so when nir (for example) includes the core mesa header it doesn't (and shouldn't) link with core mesa. To fix this we'll promote the version out of gallium util, then replace the core mesa uses with the util version, since nir (and other non-core mesa users) can and do link with mesautils. Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Ian Romanick <[email protected]>