From 0f00d5ac7cb0052dbe6357023154fc97759a58f1 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 4 Jun 2015 12:23:55 +1000 Subject: rendercheck: constrain accuracy This fixes a bunch of Dst operator, when the dst color is r5g5b5. Signed-off-by: Dave Airlie --- t_gradient.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t_gradient.c b/t_gradient.c index 1096f9a..32df8c4 100644 --- a/t_gradient.c +++ b/t_gradient.c @@ -293,7 +293,7 @@ Bool linear_gradient_test(Display *dpy, picture_info *win, pix = test_pixels; while (pix->x >= 0) { - + XRenderDirectFormat acc; get_pixel(dpy, dst, pix->x, pix->y, &tested); calculate_linear_gradient_color(pix->x, pix->y, &linear_gradient_points[p], @@ -305,7 +305,9 @@ Bool linear_gradient_test(Display *dpy, picture_info *win, &expected, False); color_correct(dst, &expected); - if (eval_diff(&dst->format->direct, &expected, &tested) > 3.) { + accuracy(&acc, &dst->format->direct, &dst_color->format->direct); + + if (eval_diff(&acc, &expected, &tested) > 3.) { snprintf(testname, 40, "%s linear gradient", ops[op].name); print_fail(testname, &expected, &tested, 0, 0, -- cgit v1.2.3