From e8634c92542be54bddd428cd8fa1e977f408030b Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 9 Mar 2018 10:25:08 -0800 Subject: [PATCH] eglGetFrameTimestamps: Don't require reads done to be monotonic. Reads done is usually monotonic, but only under the assumption that every buffer of the surface is being consumed by the same unit. It is possible for a surface to switch between being an overlay and being composited by the GPU. It's also possible a driver will maintain a shadow copy of a frame that will further affect when reads from a buffer might finish. Remove the overly strict check. Bug: 70334851, 74184639 Test: --deqp-case=dEQP-EGL*get_frame_timestamps* Change-Id: I8e242a9fd649720b4d8059797c71163329b7b92c --- modules/egl/teglGetFrameTimestampsTests.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/egl/teglGetFrameTimestampsTests.cpp b/modules/egl/teglGetFrameTimestampsTests.cpp index 09deb06..642262d 100644 --- a/modules/egl/teglGetFrameTimestampsTests.cpp +++ b/modules/egl/teglGetFrameTimestampsTests.cpp @@ -253,7 +253,7 @@ void verifySingleFrame (const FrameTimes& frameTimes, tcu::ResultCollector& resu check_lt(result, frameTimes.firstCompositionStart, frameTimes.displayPresent, "Buffer displayed before it was composited."); } -void verifyNeighboringFrames (const FrameTimes& frame1, const FrameTimes& frame2, tcu::ResultCollector& result, bool verifyReadsDone) +void verifyNeighboringFrames (const FrameTimes& frame1, const FrameTimes& frame2, tcu::ResultCollector& result) { // CPU timeline. check_lt(result, frame1.swapBufferBeginNs, frame2.swapBufferBeginNs, "Swap begin times not monotonic."); @@ -270,9 +270,6 @@ void verifyNeighboringFrames (const FrameTimes& frame1, const FrameTimes& frame2 if (timestampValid(frame1.displayPresent) && timestampValid(frame2.displayPresent)) check_lt(result, frame1.displayPresent, frame2.displayPresent, "Display present times not monotonic."); - - if (verifyReadsDone && timestampValid(frame1.readsDone) && timestampValid(frame2.readsDone)) - check_lt(result, frame1.readsDone, frame2.readsDone, "Reads done times not monotonic."); } EGLContext createGLES2Context (const Library& egl, EGLDisplay display, EGLConfig config) @@ -675,7 +672,7 @@ void GetFrameTimestampTest::executeForConfig (EGLDisplay display, EGLConfig conf if (i >= frameDelay + 1) { FrameTimes& frame6ago = frameTimes[i-frameDelay-1]; - verifyNeighboringFrames(frame6ago, frame5ago, m_result, verifyReadsDone); + verifyNeighboringFrames(frame6ago, frame5ago, m_result); } } } -- 2.7.4