From b3919fde9551f80a781948cdc2a5d3c6b4acb1c0 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Fri, 7 Aug 2015 16:03:49 +0200 Subject: [PATCH] gsdx-linux: remove an old delay that pollute my benchmark mode Also add a glFinish to ensure rendering is done --- plugins/GSdx/GS.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index c7a2445d83..f92ce8a337 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -1663,14 +1663,16 @@ EXPORT_C GSReplay(char* lpszCmdLine, int renderer) break; } } + + // Ensure the rendering is complete to measure correctly the time. + glFinish(); + unsigned long end = timeGetTime(); fprintf(stderr, "The %ld frames of the scene was render on %ldms\n", frame_number, end - start); fprintf(stderr, "A means of %fms by frame\n", (float)(end - start)/(float)frame_number); stats.push_back((float)(end - start)); - - sleep(1); finished--; total_frame_nb += frame_number; }