diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-14 00:05:26 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-14 00:05:26 +0000 |
commit | a9c78e8d291ea54f393de6a45f58f0f84202881b (patch) | |
tree | 8493e3e91aba8ec511436ba892e93ecf75fd6012 | |
parent | 2bd21c482ec03a48d2e53bd7454799b66cfdefc1 (diff) | |
parent | 567b03662dad18c49359cfb45ac51a2a9662c8e8 (diff) | |
download | deqp-android14-qpr2-s2-release.tar.gz |
Snap for 11216811 from 567b03662dad18c49359cfb45ac51a2a9662c8e8 to 24Q1-releaseandroid-14.0.0_r37android-14.0.0_r36android-14.0.0_r35android-14.0.0_r34android-14.0.0_r33android-14.0.0_r32android-14.0.0_r31android-14.0.0_r30android-14.0.0_r29android14-qpr2-s5-releaseandroid14-qpr2-s4-releaseandroid14-qpr2-s3-releaseandroid14-qpr2-s2-releaseandroid14-qpr2-s1-releaseandroid14-qpr2-release
Change-Id: Ifb7188533e7830401beff7ee3c097aa247d2c430
-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++) |