mirror of https://gitlab.freedesktop.org/mesa/mesa
util: fix test on msvc
We also miss this function on MSVC. But let's use the functionality in
meson to check for supported functions instead of hand-rolling the list
here.
Fixes: 067023dce2
("util: Add some unit tests of the half-float conversions.")
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16290>
This commit is contained in:
parent
ca280b2283
commit
5a62d00480
|
@ -1438,6 +1438,11 @@ elif with_tools.contains('intel')
|
|||
error('Intel tools require the program_invocation_name variable')
|
||||
endif
|
||||
|
||||
if cc.has_header_symbol('math.h', 'issignaling',
|
||||
args : '-D_GNU_SOURCE')
|
||||
pre_args += '-DHAVE_ISSIGNALING'
|
||||
endif
|
||||
|
||||
# MinGW provides a __builtin_posix_memalign function, but not a posix_memalign.
|
||||
# This means that this check will succeed, but then compilation will later
|
||||
# fail. MSVC doesn't have this function at all, so only check for it on
|
||||
|
|
|
@ -38,8 +38,7 @@
|
|||
#define HALF_NEG_INF 0xfc00
|
||||
#define HALF_NAN 0x7e00
|
||||
|
||||
#if defined(ANDROID) || defined (__MINGW32__)
|
||||
/* Android and mingw were missing this function, roll our own as a best effort. */
|
||||
#ifndef HAVE_ISSIGNALING
|
||||
static bool issignaling(float x)
|
||||
{
|
||||
uint32_t ui = fui(x);
|
||||
|
|
Loading…
Reference in New Issue