From: Marek Olšák Date: Thu, 11 Apr 2013 11:16:42 +0000 (+0200) Subject: gallium/hud: fix FPS computation for framerate > 4.2k X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8616b224bf267d2d114cf32c3242912313e9ccc4;p=mesa.git gallium/hud: fix FPS computation for framerate > 4.2k --- diff --git a/src/gallium/auxiliary/hud/hud_fps.c b/src/gallium/auxiliary/hud/hud_fps.c index 71cdfd04ee7..80381f54713 100644 --- a/src/gallium/auxiliary/hud/hud_fps.c +++ b/src/gallium/auxiliary/hud/hud_fps.c @@ -47,7 +47,8 @@ query_fps(struct hud_graph *gr) if (info->last_time) { if (info->last_time + gr->pane->period <= now) { - double fps = info->frames * 1000000 / (double)(now - info->last_time); + double fps = (uint64_t)info->frames * 1000000 / + (double)(now - info->last_time); info->frames = 0; info->last_time = now;