mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 06:00:10 +01:00
gallium/util: Use GCC built-in functions for NaN and infinity.
This patch fixes this build failure with Intel Compiler.
src/gallium/auxiliary/util/u_format_tests.c(903): error: floating-point operation result is out of range
{PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x7c01), UNPACKED_1x1( NAN, 0.0, 0.0, 1.0)},
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
This commit is contained in:
parent
3d0b54c7c6
commit
2faa2b4f7e
1 changed files with 5 additions and 0 deletions
|
|
@ -66,8 +66,13 @@
|
|||
{{ 0, 0, 0, 0}, { 0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define NAN __builtin_nan("")
|
||||
#define INF __builtin_inf()
|
||||
#else
|
||||
#define NAN (0.0 / 0.0)
|
||||
#define INF (1.0 / 0.0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Test cases.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue