Don't assume rendering complete before buffer latch am: 9e0214cf61 am: eb88a8ca3d
authorMark Adams <marka@nvidia.com>
Wed, 6 Dec 2017 18:26:06 +0000 (18:26 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Wed, 6 Dec 2017 18:26:06 +0000 (18:26 +0000)
am: b1e9663a56

Change-Id: I4caf81a4c64523d1ca094d7794b0541ae24ed767

modules/egl/teglGetFrameTimestampsTests.cpp

index bbf27cc..09deb06 100644 (file)
@@ -194,7 +194,8 @@ void populateFrameTimes(FrameTimes* frameTimes, TimestampInfoMap& map, const std
 
 bool timestampValid (EGLnsecsANDROID timestamp)
 {
-       return (timestamp >= 0) || (timestamp == EGL_TIMESTAMP_PENDING_ANDROID);
+       // \todo [2017-10-19 brianderson] Don't consider 0 invalid once kernel fix is in.
+       return (timestamp > 0) || (timestamp == EGL_TIMESTAMP_PENDING_ANDROID);
 }
 
 bool timestampPending (EGLnsecsANDROID timestamp)
@@ -241,7 +242,7 @@ void verifySingleFrame (const FrameTimes& frameTimes, tcu::ResultCollector& resu
        // be sure that the readsDone time must be after the renderingComplete time.
     // It may also be equal to the renderingComplete time if no reads were
     // peformed.
-       if (verifyReadsDone)
+       if (verifyReadsDone && timestampValid(frameTimes.readsDone))
                check_le(result, frameTimes.renderingComplete, frameTimes.readsDone, "Buffer rendering completed after reads completed.");
 
        // Verify CPU/GPU dependencies