[Piglit] [PATCH] cl: fix bug in piglit_cl_probe_floating
Zoltan Gilian
zoltan.gilian at gmail.com
Sat Aug 15 06:37:59 PDT 2015
The uint ulp value is compared to the float diff instead of
reinterpreting the ulp as float.
---
Note: I'm new to contributing to piglit, and I don't have commit access.
tests/util/piglit-util-cl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/util/piglit-util-cl.c b/tests/util/piglit-util-cl.c
index 47e0c7a..b49665a 100644
--- a/tests/util/piglit-util-cl.c
+++ b/tests/util/piglit-util-cl.c
@@ -80,7 +80,7 @@ piglit_cl_probe_floating(float value, float expect, uint32_t ulp)
diff = fabsf(value - expect);
- if(diff > ulp || isnan(value)) {
+ if(diff > t.f || isnan(value)) {
printf("Expecting %f (0x%x) with tolerance %f (%u ulps), but got %f (0x%x)\n",
e.f, e.u, t.f, t.u, v.f, v.u);
return false;
--
2.4.6
More information about the Piglit
mailing list