[Mesa-dev] [PATCH] gallium/hud: fix FPS computation for framerate > 4.2k

Marek Olšák maraeo at gmail.com
Thu Apr 11 04:20:14 PDT 2013


---
 src/gallium/auxiliary/hud/hud_fps.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;
 
-- 
1.7.10.4



More information about the mesa-dev mailing list