From 50d008cc39b7e1f1a65dc579785b5be45c9c8aa7 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 19 Oct 2017 14:59:28 -0700 Subject: [PATCH] eglGetFrameTimestamps: Consider timestamps of 0 as invalid. There's a bug in the kernel that doesn't merge fences properly, resulting in "reads done" timestamps of 0 when the fences being merged have already signaled. This is a temporary relaxation of the test requirements until the kernel fix is required. Bug: 68811985 Test: --deqp-case=dEQP-EGL*get_frame_timestamps* Change-Id: I5f7e56e3a0c9808237a1ebc3787cf788feef1a79 --- modules/egl/teglGetFrameTimestampsTests.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/egl/teglGetFrameTimestampsTests.cpp b/modules/egl/teglGetFrameTimestampsTests.cpp index d65d8d3..f3963bb 100644 --- a/modules/egl/teglGetFrameTimestampsTests.cpp +++ b/modules/egl/teglGetFrameTimestampsTests.cpp @@ -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 -- 2.7.4