diff options
author | Yuxin Hu <yuxinhu@google.com> | 2023-12-13 10:55:09 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-12-13 10:55:09 +0000 |
commit | 09ece3c817021c1376987794346d66f61e836473 (patch) | |
tree | 8493e3e91aba8ec511436ba892e93ecf75fd6012 | |
parent | 6ea6fa78ee473be8a416da0259b09890d42fe58f (diff) | |
parent | 6fc909daa743197818844141c1bd23350eb6e16a (diff) | |
download | deqp-09ece3c817021c1376987794346d66f61e836473.tar.gz |
Add extra warm up render loop to allow performance to stabilize am: 12ff752b20 am: 4ea3161e1b am: 6fc909daa7
Original change: https://android-review.googlesource.com/c/platform/external/deqp/+/2865362
Change-Id: I72d9e8f5cb810eeaf90325274de3d2aad5fb8b5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | modules/egl/teglGetFrameTimestampsTests.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/egl/teglGetFrameTimestampsTests.cpp b/modules/egl/teglGetFrameTimestampsTests.cpp index f846e9719..0147748d9 100644 --- a/modules/egl/teglGetFrameTimestampsTests.cpp +++ b/modules/egl/teglGetFrameTimestampsTests.cpp @@ -597,6 +597,30 @@ void GetFrameTimestampTest::executeForConfig (EGLDisplay display, EGLConfig conf gl.enableVertexAttribArray(posLocation); GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to setup shader program for rendering"); + // Do extra rendering to allow frame pacing to stabilize. + // The frame timestamp validation below assumes there is no frame janking, + // however, this is not guaranteed. + // e.g. on some hardware, the shader compilation causes first few frames + // to jank. This will cause frame timestamps read back not matching with + // expectations: compositeToPresentLatency < 4 * compositeInterval. + // Do extra frames rendering to allow frames to stablize before measuring + // and verifying frame timestamps. + const size_t stablizeFramesCount = 120; + for (size_t i = 0; i< stablizeFramesCount; ++i) + { + gl.clearColor(0.0f, 0.0f, 0.0f, 1.0f); + gl.clear(GL_COLOR_BUFFER_BIT); + GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to clear surface"); + + const bool posSelect = ((i % 2) == 0); + gl.vertexAttribPointer(posLocation, 2, GL_FLOAT, GL_FALSE, 0, posSelect ? positions1 : positions2); + + gl.drawArrays(GL_TRIANGLES, 0, 6); + GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to render"); + + EGLU_CHECK_CALL(egl, swapBuffers(display, *surface)); + } + const size_t frameCount = 120; std::vector<FrameTimes> frameTimes(frameCount); for (size_t i = 0; i < frameCount; i++) |