diff options
author | Thomas Balling Sørensen <[email protected]> | 2010-07-14 00:34:56 +0200 |
---|---|---|
committer | Thomas Balling Sørensen <tball@tball-laptop.(none)> | 2010-07-14 00:36:17 +0200 |
commit | 3299997bcc5a672617095adb560b3834dced39a6 (patch) | |
tree | 70f63a9f2049636fa3b249ce522c779173e66a13 /src/gallium/tests/unit/u_half_test.c | |
parent | 15bc635499589dc3490e5bdc198dfd376ce6fb1f (diff) |
vdpau changes
Diffstat (limited to 'src/gallium/tests/unit/u_half_test.c')
-rw-r--r-- | src/gallium/tests/unit/u_half_test.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/gallium/tests/unit/u_half_test.c b/src/gallium/tests/unit/u_half_test.c deleted file mode 100644 index 00bda7f50a6..00000000000 --- a/src/gallium/tests/unit/u_half_test.c +++ /dev/null @@ -1,32 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> -#include <float.h> - -#include "util/u_math.h" -#include "util/u_half.h" - -int -main(int argc, char **argv) -{ - unsigned i; - unsigned roundtrip_fails = 0; - for(i = 0; i < 1 << 16; ++i) - { - uint16_t h = (uint16_t) i; - union fi f; - uint16_t rh; - f.ui = util_half_to_floatui(h); - rh = util_floatui_to_half(f.ui); - if(h != rh) - { - printf("Roundtrip failed: %x -> %x = %f -> %x\n", h, f.ui, f.f, rh); - ++roundtrip_fails; - } - } - - if(roundtrip_fails) - printf("Failure! %u/65536 half floats failed a conversion to float and back.\n", roundtrip_fails); - else - printf("Success!\n"); - return 0; -} |