'scale[i]' can be non-integer.
Original patch by Philip Rebohle.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106074
Fixes: 0f3de89a56a ("radv: Use the guard band.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
get_viewport_xform(viewport, scale, translate);
- rect.offset.x = translate[0] - abs(scale[0]);
- rect.offset.y = translate[1] - abs(scale[1]);
- rect.extent.width = ceilf(translate[0] + abs(scale[0])) - rect.offset.x;
- rect.extent.height = ceilf(translate[1] + abs(scale[1])) - rect.offset.y;
+ rect.offset.x = translate[0] - fabs(scale[0]);
+ rect.offset.y = translate[1] - fabs(scale[1]);
+ rect.extent.width = ceilf(translate[0] + fabs(scale[0])) - rect.offset.x;
+ rect.extent.height = ceilf(translate[1] + fabs(scale[1])) - rect.offset.y;
return rect;
}