Commit 1780609d by Jamie Madill Committed by Commit Bot

Trace Tests: Disable timestamp queries.

This framebuffer changing timing code adds overhead so it should stay disabled unless turned on explicitly. This was causing a performance regression in the native benchmark for some trace tests like egypt. Bug: angleproject:4845 Change-Id: I51c77d544cae063ba185aa4f20d028d9ffa7a2ab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2335021Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 515b0775
...@@ -97,6 +97,7 @@ class TracePerfTest : public ANGLERenderTest, public ::testing::WithParamInterfa ...@@ -97,6 +97,7 @@ class TracePerfTest : public ANGLERenderTest, public ::testing::WithParamInterfa
std::vector<TimeSample> mTimeline; std::vector<TimeSample> mTimeline;
std::string mStartingDirectory; std::string mStartingDirectory;
bool mUseTimestampQueries = false;
}; };
class TracePerfTest; class TracePerfTest;
...@@ -195,7 +196,7 @@ void TracePerfTest::destroyBenchmark() ...@@ -195,7 +196,7 @@ void TracePerfTest::destroyBenchmark()
void TracePerfTest::sampleTime() void TracePerfTest::sampleTime()
{ {
if (mIsTimestampQueryAvailable) if (mUseTimestampQueries)
{ {
GLint64 glTime; GLint64 glTime;
// glGetInteger64vEXT is exported by newer versions of the timer query extensions. // glGetInteger64vEXT is exported by newer versions of the timer query extensions.
...@@ -314,10 +315,10 @@ double TracePerfTest::getHostTimeFromGLTime(GLint64 glTime) ...@@ -314,10 +315,10 @@ double TracePerfTest::getHostTimeFromGLTime(GLint64 glTime)
// Triggered when the replay calls glBindFramebuffer. // Triggered when the replay calls glBindFramebuffer.
void TracePerfTest::onReplayFramebufferChange(GLenum target, GLuint framebuffer) void TracePerfTest::onReplayFramebufferChange(GLenum target, GLuint framebuffer)
{ {
if (!mIsTimestampQueryAvailable) if (target != GL_FRAMEBUFFER && target != GL_DRAW_FRAMEBUFFER)
return; return;
if (target != GL_FRAMEBUFFER && target != GL_DRAW_FRAMEBUFFER) if (!mUseTimestampQueries)
return; return;
// We have at most one active timestamp query at a time. This code will end the current // We have at most one active timestamp query at a time. This code will end the current
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment