glx: print FPS with 2 decimal places
useful if FPS is low. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3590> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3590>
This commit is contained in:
parent
1082e6fcb8
commit
01443dc738
|
@ -776,7 +776,7 @@ static void show_fps(struct dri2_drawable *draw)
|
|||
|
||||
if (draw->previous_time + interval * 1000000 <= current_time) {
|
||||
if (draw->previous_time) {
|
||||
fprintf(stderr, "libGL: FPS = %.1f\n",
|
||||
fprintf(stderr, "libGL: FPS = %.2f\n",
|
||||
((uint64_t)draw->frames * 1000000) /
|
||||
(double)(current_time - draw->previous_time));
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ glx_dri3_show_fps(struct loader_dri3_drawable *draw, uint64_t current_ust)
|
|||
/* DRI3+Present together uses microseconds for UST. */
|
||||
if (priv->previous_ust + interval * 1000000 <= current_ust) {
|
||||
if (priv->previous_ust) {
|
||||
fprintf(stderr, "libGL: FPS = %.1f\n",
|
||||
fprintf(stderr, "libGL: FPS = %.2f\n",
|
||||
((uint64_t) priv->frames * 1000000) /
|
||||
(double)(current_ust - priv->previous_ust));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue