From e7cc2409780e67261093eca746c9ec42064ce353 Mon Sep 17 00:00:00 2001 From: Jiayuan Ren Date: Tue, 14 Aug 2018 12:09:01 -0700 Subject: [PATCH] Fix: rendering complete times not monotonic We run into an intermittent issue that two neighboring frames have the same rendering complete timestamp. The timers will always have finite granularity. The timestamp is in nanosecond but the timer producing these timestamps might not actually be able to produce timestamps at 1ns resolution. When the timer used for these events has not enough granularity, events that happen very quickly right after one another will appear as if they appear at the same point in time. Two neighboring frames have the same timestamp is allowed. Components: AOSP VK-GL-CTS issue: 1311 Bug: b/112778381 Affects: dEQP-EGL.functional.get_frame_timestamps.* (cherry picked from commit 59b6ba9bb2b8a280a30e931fb9b69f492650d14d) Change-Id: I10c9f7d50d079fcad000baee028a97fea5b69c3c --- modules/egl/teglGetFrameTimestampsTests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/egl/teglGetFrameTimestampsTests.cpp b/modules/egl/teglGetFrameTimestampsTests.cpp index 5f0a209..f55a3c4 100644 --- a/modules/egl/teglGetFrameTimestampsTests.cpp +++ b/modules/egl/teglGetFrameTimestampsTests.cpp @@ -262,7 +262,8 @@ void verifyNeighboringFrames (const FrameTimes& frame1, const FrameTimes& frame2 check_lt(result, frame1.dequeueReady, frame2.dequeueReady, "Dequeue ready times not monotonic."); // GPU timeline. - check_lt(result, frame1.renderingComplete, frame2.renderingComplete, "Rendering complete times not monotonic."); + // Same rendering complete time is fine. + check_le(result, frame1.renderingComplete, frame2.renderingComplete, "Rendering complete times not monotonic."); if (timestampValid(frame1.firstCompositionGpuFinished) && timestampValid(frame2.firstCompositionGpuFinished)) check_lt(result, frame1.firstCompositionGpuFinished, frame2.firstCompositionGpuFinished, "Composition GPU work complete times not monotonic."); -- 2.7.4