summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/hud
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2013-04-11 13:16:42 +0200
committerMarek Olšák <maraeo@gmail.com>2013-04-16 13:56:47 +0200
commit8616b224bf267d2d114cf32c3242912313e9ccc4 (patch)
treee4b5a63109d970d71ed501d64eb2164f368eeeba /src/gallium/auxiliary/hud
parent332af88c391924c70bbcbeb4c131caea796534f6 (diff)
downloadexternal_mesa3d-8616b224bf267d2d114cf32c3242912313e9ccc4.zip
external_mesa3d-8616b224bf267d2d114cf32c3242912313e9ccc4.tar.gz
external_mesa3d-8616b224bf267d2d114cf32c3242912313e9ccc4.tar.bz2
gallium/hud: fix FPS computation for framerate > 4.2k
Diffstat (limited to 'src/gallium/auxiliary/hud')
-rw-r--r--src/gallium/auxiliary/hud/hud_fps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/hud/hud_fps.c b/src/gallium/auxiliary/hud/hud_fps.c
index 71cdfd0..80381f5 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;