diff options
author | José Fonseca <[email protected]> | 2012-06-29 13:39:07 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-06-29 13:39:07 +0100 |
commit | c9bada497c096ddbb4e07f3eaaeeb70afbbfcfba (patch) | |
tree | c0b43688ba28bcfd6e413f1428fe00e8542ddb2f | |
parent | fa8dcb848f9380e3daa3568563c23d9e21668bda (diff) |
gallium/util: Disable INF/NAN tests on MSVC.
Somehow they are not recognized as constants.
-rw-r--r-- | src/gallium/auxiliary/util/u_format_tests.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_format_tests.c b/src/gallium/auxiliary/util/u_format_tests.c index bd7a290c46e..9f6d17c607d 100644 --- a/src/gallium/auxiliary/util/u_format_tests.c +++ b/src/gallium/auxiliary/util/u_format_tests.c @@ -26,9 +26,11 @@ **************************************************************************/ +#include <float.h> + +#include "pipe/p_config.h" #include "u_memory.h" #include "u_format_tests.h" -#include <float.h> /* @@ -895,6 +897,8 @@ util_format_test_cases[] = /* Max representable value */ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x7bff), UNPACKED_1x1( 65504.0, 0.0, 0.0, 1.0)}, +#if defined(PIPE_CC_MSVC) + /* NaNs */ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x7c01), UNPACKED_1x1( NAN, 0.0, 0.0, 1.0)}, {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xfc01), UNPACKED_1x1( -NAN, 0.0, 0.0, 1.0)}, @@ -905,6 +909,8 @@ util_format_test_cases[] = {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x7c00), UNPACKED_1x1( INF, 0.0, 0.0, 1.0)}, {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xfc00), UNPACKED_1x1( -INF, 0.0, 0.0, 1.0)}, +#endif + /* Zero, ignore sign */ {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0x7fff), PACKED_1x16(0x8000), UNPACKED_1x1( -0.0, 0.0, 0.0, 1.0)}, {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0x7fff), PACKED_1x16(0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, |